It works now, Thanks<br><br><div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span class="q"></span><br>
Is this your own Perl script?<br>
Does this perl script use warnings, and load the 'strict' module?<br>
ie:<br>
<br>
#!/usr/bin/perl <b>-w</b><br>
<b>use strict;</b><br>
..rest of script..<br>
<br>
I suspect that you have not enabled Strict mode in your script, and
have not given the -w (warning) flag to perl..<br>
<br>
What if you run 'perl -w -c <scriptname>' does it warn you about
the same errors?<br>
<br>
You should be defining your variables with 'my' or 'our' functions at
the beginning of your script.<br>
<br>
The embedded perl interpereter in Nagios probably is using the good
coding practices of using warnings and strict code checking, which is
why you are seeing these errors.<br>
<br>
Review your script, change the lines<span class="q"><br>
<br>
$script = "check_snmp_apcups";<br>
$script_version = "2.1.0";<br>
<br></span>
to <br>
<br>
<b>my </b>$script = "check_snmp_apcups";<br>
<b>my </b>$script_version = "2.1.0";<br>
<br>
And all subsequent variables, and you shouldn't receive any warnings.
The warnings are telling you that you aren't defining your variables.
Define the variables and there will be no warnings.<br>
<br>
Cheers<br><span class="sg">
rob<br>
<br>
</span></blockquote></div><br>