Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Net::telnet question

by lwicks (Friar)
on Apr 22, 2008 at 12:54 UTC ( [id://682157]=note: print w/replies, xml ) Need Help??


in reply to Net::telnet question

You can use something like:
$t->waitfor( Match => '/FLMON>/', Timeout => 120 );
to look for the prompt. This is particularly handy if the prompt changes through the process.

Else if the prompt remains static, you can set the prompt permanently like this:

$t = new Net::Telnet (Timeout => 10, Prompt => '/bash\$ $/');

Obviously, http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm is place to look for more details.

Hope that helps.
Lance

Kia Kaha, Kia Toa, Kia Manawanui!
Be Strong, Be Brave, Be perservering!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://682157]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-28 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found