cmd gets timed out

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I am facing a timeout problem. I am logging in to a terminal server
port .This session does not have any prompt , its just blank .I wrote
the follwoing script works fine till  "print "WHERE AM I\n";"
and then it gets timed out :-(....i am not sure whats wrong...since
there is no prompt also...setting a prompt on net::telnet is also not
known to me ???Can anybody help.?

sub executeCommand
      use constant DEBUG => 1;
      my $ipaddress = $_[0];
      my $portnum = $_[1];
      my $command = $_[2];
      print "command is $command";
      my $objIdentifier = new Net::Telnet (Timeout=> 20, Input_log=>
"debug-telnet.txt") || die;
      $objIdentifier->open(Host => $ipaddress,Port => $portnum);
      print "objectidentifier = $objIdentifier";
      print "Host ip address = $ipaddress\n";
      print "Host port number =$portnum\n";
      print "WHERE AM I\n";
      print "i am before snd cmd\n";
      @output= $objIdentifier->cmd($command);
      print "WHERE IS THE OUTPUT DUDE?";
      print "OUTPUT of command $command=@output\n";


Site Timeline