try:
$LANstat = system(" $utadm_l | grep On") ;
change =>
my $LANstat = ` $utadm_l | grep On` ;
good luck:)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Oct 21, 4:40 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
> Ariel Casas wrote:
> > Hello all,
>
> Hello,
>
>
>
> > Any time I run a unix command where I initiate a variable > use the
> > variable as an arg in the unix command > pipe it to another unix
> > command, I get an error. This is the er
Ariel Casas wrote:
Hello all,
Hello,
Any time I run a unix command where I initiate a variable > use the
variable as an arg in the unix command > pipe it to another unix
command, I get an error. This is the error I get:
---
./test.1.pl
Use of uninitialize
Try moving $utadm_1 up a few lines, before calling the subroutine.
#!/usr/bin/perl -w
$utadm_l = "/opt/SUNWut/sbin/utadm -l" ;
check_LANon () ;
sub check_LANon {
$LANstat = system(" $utadm_l | grep On") ;
print "$LANstat\n" ;
}
Dave
On Tue, 21 Oct 2008 03:06:34 +1000, Ariel C
Hello all,
Any time I run a unix command where I initiate a variable > use the
variable as an arg in the unix command > pipe it to another unix
command, I get an error. This is the error I get:
---
./test.1.pl
Use of uninitialized value in concatenation (.) or