in reply to Re: (jeffa) Re: getting output from backticks
in thread getting output from backticks
While this doesn't store the return code from the system call, it does allow you to treat the system call with logical operators like any other perl program# SubRoutine: sysrun # # Run System Command sub sysrun { my ($command) =@_; my $ret_code; $ret_code = system("$command"); if ( $ret_code == 0 ) { # Job suceeded $ret_code = 1; } else { # Job Failed $ret_code = 0; } return ($ret_code); }
|
|---|