monk2b has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use warnings; use Net::SSH::Expect; my $command0 = "ls -l /tmp"; my $command1 = "ls -l /temperature"; RunCmd(); sub RunCmd{ system("$command0 > /dev/null"); print "System status info is $? \n"; system("$command1 > /dev/null 2> /dev/null"); print "System status info is $? \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: system() status weirdness
by pc88mxer (Vicar) on Mar 28, 2008 at 18:18 UTC | |
by monk2b (Pilgrim) on Mar 28, 2008 at 20:13 UTC |