in reply to Net::Telnet question
This method sets the pattern used to find a prompt in the input stream. It must be a string representing a valid perl pattern match operator. The methods login() and cmd() try to read until matching the prompt. They will fail with a time-out error if the pattern you've chosen doesn't match what the remote side sends.$prev = $obj->prompt($matchop);
With no argument this method returns the prompt set in the object. With an argument it sets the prompt to $matchop and returns the previous value.
The default prompt is '/[\$%#>] $/'
Always use single quotes, instead of double quotes
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Net::Telnet question
by K_M_McMahon (Hermit) on Feb 25, 2004 at 16:15 UTC |