I would suggest that you maybe should change to pass the array's ref as a parameter to the subroutine.modify here:

namedchk();
to
namedchk([EMAIL PROTECTED]);

and in your namedchk subroutine:

sub namedchk {
   my @arry = @{+shift};
....
}

It's a good programming practice to use the global variables carefully.


From: "Smith, Derek" <[EMAIL PROTECTED]>
To: <beginners@perl.org>
Subject: uninitialized value error
Date: Wed, 21 Jun 2006 11:23:18 -0400


I am getting the following error yet the script is doing what I need it to do restart a process:
?lt;/span>
Use of uninitialized value at /usr/local/admin/named_monit.pl line 71 (#1)
?lt;/span>
   (W) An undefined value was used as if it were already defined.?It was
   interpreted as a "" or a 0, but maybe it was a mistake.?To suppress this
   warning assign an initial value to your variables.
?lt;/span>
ps: wrong PID number -o
ps: Unknown option (vsz).
Did not close FH ps   at /usr/local/admin/named_monit.pl line 86.
Did not close FH pso?at /usr/local/admin/named_monit.pl line 87.
?lt;/span>
?lt;/span>
?lt;/span>
Here is my code as attached, but please excuse the Perl version?. 5.005_03
Thank you
Derek
?lt;/span>
?lt;/span>
Derek Bellner Smith
Unix Systems Engineer
Cardinal Health Dublin, Ohio
?lt;/p>
?lt;/span>
_________________________________________________

This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.

Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk - Portuguese - Svenska: www.cardinalhealth.com/legal/email



<< named_monit.pl >> --
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to