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?
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!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; } }
|
|---|