Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^6: Net::Telnet timed out when logging in

by glide (Pilgrim)
on Apr 18, 2008 at 09:14 UTC ( #681427=note: print w/replies, xml ) Need Help??


in reply to Re^5: Net::Telnet timed out when logging in
in thread Net::Telnet timed out when logging in

Hi,

You need to read the Net::Telnet documentation, and do, at least, a small configuration of the module.

$telnet = new Net::Telnet(timeout => 10, # do not you the 'return' Errmode => 'die', # change the prompt Prompt => '/ </$'); # I'm gue +ssing this prompt ' <' $telnet->input_log($log_file); $telnet->dump_log($dump_file); $telnet->waitfor( -match => qr{ENTER USERNAME} ); $telnet->print($username); $telnet->waitfor( -match => qr{ENTER PASSWORD} ); $telnet->print($passard); # # and finally send a command @lines = $t->cmd("who"); for (@lines) { print }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://681427]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2018-02-21 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (283 votes). Check out past polls.

    Notices?