in reply to Re^3: Where is the bug in this Net::SNMP code?
in thread Where is the bug in this Net::SNMP code?

Hi all. I neew you wisdom. I'm going to pool status information from network printers. I'm using code:
foreach my $k (@ips) { my $hostname = "10.0.0.$k"; my $password = "public"; my ( $session, $error ) = Net::SNMP->session ( Hostname => $hostname, +Community => $password , Version => 1 ); if (!defined($session)) { printf("ERROR: %s.\n", $error); next; } }
in @ips I have last octet of IP's The problem is if one of the printer is swiched off the programm break Could you tell me what I'm doing wrong? Thanks in advance!