Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Perl SNMP Error Handling

by choroba (Abbot)
on Jul 11, 2013 at 19:01 UTC ( #1043812=note: print w/ replies, xml ) Need Help??


in reply to Perl SNMP Error Handling

You can use eval or Try::Tiny.

my ($descr, $uptime); if (eval { ($descr, $uptime) = $snmp->get($vars); 1 }) { ... } else { warn $@; }
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Perl SNMP Error Handling
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043812]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-04-18 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (472 votes), past polls