start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: 8.139 Term::Complete Chapter 8
Standard Modules
Next: 8.139 Term::Complete
 

Complete

Complete ('

prompt_string

', 

array

)

Sends string to the currently selected filehandle, reads the user's response, and returns the response. Takes the following arguments:

prompt_string

The prompt for user input.

array

The array of words against which the user's input is matched.

If any of the following characters are included in the user's response to prompt_string , they are treated as special characters:

TAB

Does word completion, matching what the user has typed so far against the list of strings in completion_list . On a unique match, outputs the rest of the matched string and waits for the user to press the return key. Otherwise, leaves partial input unchanged and sounds the bell.

CTRL-D

Prints all possible completions of the user's partial input, or the entire completion list if the partial input string is null, and reissues the prompt string and the partial input. Redefine by setting the variable $Term::Complete::complete .

CTRL-U

Erases any partial input. Redefine by setting the variable $Term::Complete::kill .

DEL , BS

Delete and backspace characters; both erase one character from the partial input string. Redefine by setting the variables $Term::Complete::erase1 and $Term::Complete::erase2 .


Previous: 8.139 Term::Complete Perl in a Nutshell Next: 8.139 Term::Complete
8.139 Term::Complete Book Index 8.139 Term::Complete