So before retirement, a former employee wrote a series of perl scripts that capture and analyze SNMP and other types of events within the intranet, sending important ones on to the operator console used by support staff.
The line
$EVmsg = sprintf($DIcas_text, @HR) ;
rarely, but occasionally, produces the runtime error:
Use of uninitialized value in sprintf at evmon.pl line 1194.
What I would like to do is add some perl that would write to an error log, in this singular case, not only this error, but the values of $DIcas_text, @HR, and possibly a few other variables that would help us debug the situation.
I'm not certain how best to intercept and augment the message with the additional information.
This is perl5 revision 5 version 8 subversion 4, running on Linux.
Can anyone point me to relevant tutorials, etc. on how to approach this situation?
I don't want a lot (any?) extraneous output when there are no errors.
Thank you