Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Perl SNMP Error Handling

by choroba (Bishop)
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 $@; }
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043812]
help
Chatterbox?
[Happy-the-monk]: Discipulus: si!
[Eily]: Discipulus 2018 has to be better than 2017. The latter was kinda odd, but not we got even :D
[Corion]: Eily++ # basic number theory

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2018-01-23 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (242 votes). Check out past polls.

    Notices?