in reply to Re^2: Problems with the module Net::SNMP
in thread Problems with the module Net::SNMP
my $result = $session->get_next_request ( varbindlist => [ $param{sysN +ame}.$1] ); die "request error: ".$session->error unless ( defined $r +esult );
The reason that your program breaks is that it directly calls "die" which brings the script to an immediate end... see die for the details. I think that if you change it to "warn" or even a plain "print" it will do what you are looking for. For similar reasons, you will also need to change
unless ( $param{sysName} =~ /$param{sysName}(.*)/ ) {last}
on the next line to
unless ( $param{sysName} =~ /$param{sysName}(.*)/ ) {next}
since the "last" will exit the loop so no more ip's will be tried.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Problems with the module Net::SNMP
by tolyan77 (Novice) on Nov 08, 2006 at 10:46 UTC | |
by quester (Vicar) on Nov 08, 2006 at 23:43 UTC |