Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Multiple conditions matching when pulling OID value with Net::SNMP

by Smaug (Pilgrim)
on Oct 20, 2006 at 16:35 UTC ( [id://579637] : note . print w/replies, xml ) Need Help??


in reply to Multiple conditions matching when pulling OID value with Net::SNMP

Hi Bennco99,

You're setting values. Assuming that the UPS will only run on either commercial power or battery the below should resolve your problem:
if ( $status == 3 ) { print "The ups is normal\n"; } else { print "The ups is on battery\n"; } $session->close;