Of course. Simply test the defined nature of your object before trying to call the method.
if (defined $snmp) { ($descr,$uptime) = $snmp->get($vars); } else { die 'Horrors! My $snmp object is undefined!'; }
... or similar.
In reply to Re: Perl SNMP Error Handling
by hippo
in thread Perl SNMP Error Handling
by skunix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |