Have given it many attempts to fix….but
now need help..
Derek
Bellner Smith
Unix
Systems Engineer
Cardinal
Health Dublin, Ohio
From: Smith, Derek
Sent: Wednesday, June 21, 2006
11:19 AM
To: beginners@perl.org
Subject: uninitialized value error
I am getting the f
On Wednesday 21 June 2006 16:23, Smith, Derek wrote:
> I am getting the following error yet the script is doing what I need it
> to do restart a process:
>
>
>
> Use of uninitialized value at /usr/local/admin/named_monit.pl line 71
> (#1)
>
>
What is the code at line 71?
Is it something like
$va
-Original Message-
From: Gary Stainburn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 11:35 AM
To: beginners@perl.org
Subject: Re: uninitialized value error
On Wednesday 21 June 2006 16:23, Smith, Derek wrote:
> I am getting the following error yet the script is doing wha
Smith, Derek wrote:
: I am getting the following error yet the script is doing what
: I need it to do restart a process:
:
: Use of uninitialized value at /usr/local/admin/named_monit.pl
: line 71 (#1)
It seems that when the test on line 64 is true, $arry[0] is
not defined (and not initiali
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 var
On 21 Jun 2006 at 11:28, Smith, Derek wrote:
> From: Smith, Derek
> Sent: Wednesday, June 21, 2006 11:19 AM
> To: beginners@perl.org
> Subject: uninitialized value error
>
>
> I am getting the following error yet the script is doing what I need it to do
> restart a process:
>
> Use of uninitializ
On 21 Jun 2006 at 17:08, Beginner wrote:
> for (;;) {
> print SDTERR "PS=$_\n";
> push @arry, (split)[1];
> }
of course that should read
print STDERR "PS=$_\n";
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROT
-Original Message-
From: Charles K. Clarkson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 11:53 AM
To: beginners@perl.org
Subject: RE: uninitialized value error
Smith, Derek wrote:
: I am getting the following error yet the script is doing what
: I need it to do restart a
-Original Message-
From: Beginner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 12:16 PM
To: beginners@perl.org
Subject: RE: uninitialized value error
On 21 Jun 2006 at 17:08, Beginner wrote:
> for (;;) {
> print SDTERR "PS=$_\n";
>
> open (PS, "ps -ef|grep /usr/sbin/[n]amed |") or die "not spawn ps $!";
ps -ef works, so does grep... but if named isn't running (or
/usr/sbin/[n]amed doesn't match it), you won't be able to read much from PS.
> for (;;) {
> push @arry, (split)[1];
> }
(Why not 'while ()' instead? It's the sam
Smith, Derek wrote:
: Charles K. Clarkson wrote:
:
: : It seems that when the test on line 64 is true, $arry[0]
: : is not defined (and not initialized) and throws this error.
:
: I thought that was the problem initially but tested it and I do
: see this element populated on lines 64 and 65
When closing your format code, use a single dot, not two of them.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 10:15 AM
To: [EMAIL PROTECTED]
Subject: Uninitialized Value Error
When I run the following script, I get the following
At 11:00 AM 2/25/02 -0800, Lyon, Justin wrote:
>When closing your format code, use a single dot, not two of them.
I will bet that the original posting contained a single dot. Many MTAs
prepend a line starting with a dot with another dot, and many MUAs don't
reverse this operation. Your postin
I am not sure how that second period got, there but it
is not there is the original source, therefore I still
get the same error.
Any other recommendations are greatly appreciated.
Thanks
> When closing your format code, use a single dot, not two of them.
>
> -Original Message-
> From
I don't know if this is the problem, but are you missing a } somewhere? I
couldn't find one for your second while loop.
Justin
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 10:15 AM
> To: [EMAIL PROTECTED]
> Subject: Uniniti
H. Well, I think the problem is that you're using too strict
guidelines. "my" will restrict you from using a variable outside the
current scope, so you won't be able to access it come time to format. The
quickest way arround that is to get rid of your "use strict;" line, and then
get rid of
Predeclare all of the variables you're using in your format at the top of
the script with my:
my ($field1, $field2, $field3);
this way you can still keep the benefits of use strict
On Mon, 25 Feb 2002, Lyon, Justin wrote:
> H. Well, I think the problem is that you're using too strict
> g
the first argument
}
-Original Message-
From: Lyon, Justin [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 12:53 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Uninitialized Value Error
H. Well, I think the problem is that you're using too strict
guidelines. "my&q
<<<
$field1, $field2, $field3
..
} # Just move this bracket, and get rid of the my's on the line above
-----Original Message-
From: Luke Bakken [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 1:09 PM
To: Lyon, Justin
Cc: '[EMAIL PROTECTED]'; [EMAIL PROTE
t;<<<<<< @<<<<<<<<<<<<<<
> $field1, $field2, $field3
> ..
> } # Just move this bracket, and get rid of the my's on the line above
>
>
> -Original Message-
> From: Luke Bakken [mailto:[EMAIL PROTECTED]]
>
<<<< @<<<<<<<<<<<<<< @<<<<<<<<<<<<<<
> $field1, $field2, $field3
> ..
> } # Just move this bracket, and get rid of the my's on the line above
>
>
> -Original Message-
>
Thanks for all your help, I got working.
Thanks again.
-Original Message-
From: Luke Bakken [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 6:11 PM
To: Lyon, Justin
Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: Uninitializ
22 matches
Mail list logo