modified the code.

  my $t = new Net::Telnet (Timeout => 20,
                           Prompt => '/bash\$ $/',
                           Dump_Log   => $filename,
                           Input_log  => $file,
                           Errmode    => $errmode,
                           Host => $host,
                           Input_record_separator => "\n",
                           Output_record_separator => "\n",
);

     $t->open("$host");
     $t->login($username, $passwd);

my @lines = $t->cmd("ls");
         print "@lines\n";
     my $ok = $t->print(@lines);
    print "$ok\n";

in this code also , i am expecting @lines should print the contents 
of "ls" command
when i execute this code , it just execute without any error

but the content of @lines are NULL
the dump_log and input_log says , it has successfully connected to 
remote server and executed the "ls " command but @lines does not 
contain any output of "ls" command/

this is also not happening

plz suggest


________________________________
From: Jim Gibson <jimsgib...@gmail.com>
To: Irfan Sayed <irfan_sayed2...@yahoo.com>; beginners@perl.org
Sent: Saturday, July 9, 2011 4:08 AM
Subject: Re: Help on Net::Telnet perl module




 You chose to allow Jim Gibson (jimsgib...@gmail.com) even though this message 
failed authentication 
Click to disallow 

Reply via email to