December 2000
Intermediate to advanced
784 pages
20h 54m
English
The PromptUtil.pm module provides basic functionality for prompting the user for passwords and commands. A more sophisticated package of prompt utilities is the Term::Prompt module, found on CPAN.
This module exports two functions. The get_passwd() function prompts for a password, turning off echo so that the user's response is not visible. If a username and host is provided, the prompt includes this information (used when logging into a particular account on a remote host).
The prompt() function takes the text of a prompt and a default to return if the user enters no value. The user is prompted with the given prompt, and the function returns his response. As a special case, the function checks for a response ...
Read now
Unlock full access