1

Grep in line use perl

view story
linux-howto

http://www.unix.com – Hi, i want to create perl script to telnet and print the output. : This is the script that i have so far : Code: #!/usr/bin/perl use lib '/usr/lib/perl5/5.14'; use Telnet (); $target = "192.168.5.1"; $user = "root"; $passwd = "admin123"; print "####################################################################################\n";  $t = new Net::Telnet (Timeout => 20); eval { $t->open($target) }; print "Logging in to $target!\n"; $t->login($user, $passwd);   print "Waiting for prompt!\n"; $t->waitfo (HowTos)