in reply to Re: Net::Telnet + command prompt
in thread Net::Telnet + command prompt
Thanks to all for your help.foreach $host (sort @hosts) { $t = new Net::Telnet (Timeout => 10, Input_log => $file, Prompt => "/\>/"); print "\n\nConnecting to $host ...\n"; $t->open("$host"); $t->login("abc","abc123"); my @lines = $t->cmd('dir'); print "$host: Directory Contents:\n"; print "@lines \n"; $t->close; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: RESOLVED: Net::Telnet + command prompt
by Anonymous Monk on Mar 06, 2014 at 15:47 UTC | |
by Anonymous Monk on Mar 11, 2014 at 11:02 UTC |