Using utils.pl
Posted: Thu May 22, 2014 6:55 am
Hello all!!!
I would expect that my little sample script would print 0 but this is what happens:
Any help is much appreciated because this has me at a stand still! Thanks!
Code: Select all
#!/usr/bin/perl -w
#use strict;
use lib "/opt/openitc/nagios/libexec";
use utils;
print "$ERRORS{'OK'}\n";
Code: Select all
# ls /opt/openitc/nagios/libexec/utils.pm
/opt/openitc/nagios/libexec/utils.pm
Code: Select all
[06:52]root@OWMaster~/bjw# ./test
Name "main::ERRORS" used only once: possible typo at ./test line 8.
Use of uninitialized value $ERRORS{"OK"} in concatenation (.) or string at ./test line 8.