in reply to Re: Multiple conditions matching when pulling OID value with Net::SNMP
in thread Multiple conditions matching when pulling OID value with Net::SNMP
When I turn on strict I get:my @values = values (%$result); foreach my $key (@values) { print "key:$key\n"; $status = $key; } print "status:$status\n";
How do I define $status to be used outside of the loop and not get the above errors?Global symbol "$status" requires explicit package name at C:\SNMP.pl l +ine 21. Global symbol "$status" requires explicit package name at C:\SNMP.pl l +ine 24. Global symbol "$status" requires explicit package name at C:\SNMP.pl l +ine 26. Global symbol "$status" requires explicit package name at C:\SNMP.pl l +ine 30. Execution of C:\SNMP.pl aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Multiple conditions matching when pulling OID value with Net::SNMP
by chargrill (Parson) on Oct 20, 2006 at 19:08 UTC |