Hello everyone, I am currently doing some scripting in Perl and i am using the Perl module for Net-SNMP. I use the following code to establish a snmp session:
$sess = new SNMP::Session (DestHost => $host, Community => $comm, Version => $ver); if ($sess->{ErrorNum}) { print "Got $sess->{ErrorStr} querying $host for.\n";} This works if the host i am trying to reach is online and is an snmp agent. However if i deliberately put the host down, the script should suposedly go down to the next sentence: if ($sess->{ErrorNum}) { print "Got $sess->{ErrorStr} querying $host for.\n";} and thus it should print: Got $sess->{ErrorStr} querying $host for. Bu it doesn't print it. What am i doing wrong here? Cheers, Raul de Sa ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users