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 the fog begins to lift...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2018-07-20 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (439 votes). Check out past polls.

    Notices?