in reply to Re^3: Net::Telnet: how to detect an empty line...
in thread Net::Telnet: how to detect an empty line...
my @resp; my @all_resp; my $s = new IO::Socket::INET( PeerAddr => 'localhost', Peerport => 400 +0, Proto => 'tcp', Timeout => 4); print "before unless"; unless ($s) { die "unable to connect..." } sleep 1; # we are connected, so just start sending commands print $s "auth admin 555555\r\n"; sleep 1; @resp = <$s>; # expect one line response push (@all_resp, @resp); print $s "voo allowed_ips\r\n"; sleep 1; @resp = <$s>; push (@all_resp, @resp); print @all_resp;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Net::Telnet: how to detect an empty line...
by Corion (Patriarch) on Feb 27, 2008 at 07:02 UTC |