jcpunk has asked for the wisdom of the Perl Monks concerning the following question:
telnet_login($username,$password,$host,\$telnet); ...... sub telnet_login { use Net::Telnet; my ($username, $password, $host, $telnet) = @_; my $error_msg= "Incorrect username or password, please try again"; $$telnet = new Net::Telnet (Timeout=>7, # Errmode=>\&report_error($error_msg)); ####the above line is the one spoken of in my description############# +####### $$telnet->dump_log("./Plog.log"); # generate log $$telnet->open(Host=>$host); $$telnet->login($username,$password); } .......... sub report_error { my $thing = shift; print $thing; die; }
by the way thanks for all the help that was, is, and will be
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Telnet, Errmode problem
by JamesNC (Chaplain) on Jun 19, 2003 at 20:52 UTC | |
by jcpunk (Friar) on Jun 20, 2003 at 14:15 UTC | |
|
OT: Net:SSH
by neilwatson (Priest) on Jun 19, 2003 at 19:55 UTC |