Here we go:
Making connection to yahoo..It works..Now if you change to an unexisting web page it fails and goes to the error routine.
#!/usr/bin/perl
use Net::Telnet;
$connection=Net::Telnet->new(Timeout => 5, Host => "
Port=>80, errmode =>sub {&error});
sub error {
print "Connection Failed!\n";
}
__________________________________________________________
Other:
#!/usr/bin/perl
use Net::Telnet;
$connection=Net::Telnet->new(Timeout => 5, Host => "
Port=>80);
# This error handler prints the errmsg and continues.
$connection->errmode( sub { print @_, "\n" } );
----------------------------------------------------------
Other
telnet = new Net::Telnet;
$telnet->errmode( sub { print "ERROR:" . join('|', @_) . "\n"; } );
dmazzini
GSM System and Telecomm Consultant