Re: using unix command issue...

2008-10-26 Thread 悬非
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/

Re: using unix command issue...

2008-10-23 Thread cancer
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

Re: using unix command issue...

2008-10-20 Thread John W. Krahn
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

Re: using unix command issue...

2008-10-20 Thread Dave Tang
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

using unix command issue...

2008-10-20 Thread Ariel Casas
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