I am looking for some help debugging a problem with the Net::Telnet module
written by Jay Rogers.

Here's the subroutine I am having problems with:

sub login
  {
   $errmode = 'return';
   $hostaddress = 'xxx.xxx.xxx.xxx'; 
   $prompt = '/Sheldon_NS16>/';
   $username = 'xxxxxxxx';
   $password = 'xxxxxxxx';
   $obj = new Net::Telnet ( Host => $hostaddress,
                              Errmode => $errmode,
                              Prompt =>  $prompt,
                              Timeout => 15,
                              Port => 23 );
  $obj->login($username, $password);  # line 212
  $errmsg = $obj->errmsg;
  print STDOUT "Error - $errmsg\n" unless ($errmsg eq "");
  }

This subroutine is part of a larger script (sheldon.pl) that calls this
subroutine once per minute
 to login to a modem pool to get user information and log it for tracking
users usage.  
The program will run for 1-2 days before dying.  The error I get is as
follows:

Can't call method "login" on undefined value at ./sheldon line 212.

As I said above, the script will run for a day or two collecting data
without any problems, then
die with the error above.  Any Perls of wisdom out there?

Thanks, 

Sean Johnson


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to