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.
In reply to Re^2: Multiple conditions matching when pulling OID value with Net::SNMP
by Bennco99
in thread Multiple conditions matching when pulling OID value with Net::SNMP
by Bennco99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |