in reply to Trying to capture error message using telnet::net
dda@x700:/tmp$ perl nt.pl errmsg: problem connecting to "localhost", port 23: Connection refused dda@x700:/tmp$ cat nt.pl #!/usr/bin/perl -w use strict; use Net::Telnet; my $telnet = new Net::Telnet ( Timeout=>10, Port => 23, Errmode=>'retu +rn'); $telnet->open("localhost"); print "errmsg: " . $telnet->errmsg . "\n"; dda@x700:/tmp$
--dda
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trying to capture an error using NET::TELNET
by tprizler (Novice) on Sep 02, 2008 at 08:25 UTC | |
by Anonymous Monk on Sep 02, 2008 at 08:44 UTC | |
by tprizler (Novice) on Sep 02, 2008 at 12:04 UTC | |
by blazar (Canon) on Sep 05, 2008 at 10:47 UTC | |
by Anonymous Monk on Sep 02, 2008 at 12:08 UTC | |
by Anonymous Monk on Sep 20, 2011 at 16:21 UTC |