I am using Net::Telnet in my script.
my $t = new Net::Telnet (Timeout => 10);
$t->open("$host");
$t->login($uid, $passwd);
$t->cmd("chmod 700 $rmtDir/$putFile");
$t->cmd("$rmtDir$putFile");
sleep 10;
More code to parse the $putFile.
--------------------------------
Sometimes the telnet session times out, so the rest of the script does not execute, with an error on the command line stating that the session timed out. Is there a way to handle this error (i.e log it and skip it)and move on to execute the next block of code.
Thank you.
my $t = new Net::Telnet (Timeout => 10);
$t->open("$host");
$t->login($uid, $passwd);
$t->cmd("chmod 700 $rmtDir/$putFile");
$t->cmd("$rmtDir$putFile");
sleep 10;
More code to parse the $putFile.
--------------------------------
Sometimes the telnet session times out, so the rest of the script does not execute, with an error on the command line stating that the session timed out. Is there a way to handle this error (i.e log it and skip it)and move on to execute the next block of code.
Thank you.