in reply to Re: Question using system.
in thread Question using system.
but remember you cannot check return codeFrom perlvar, $?:
The status returned by the last pipe close, backtick (`` ) command, successful call to wait() or waitpid(), or from the system() operator.
use strict; use warnings; my $out; $out = `ls /tmp`; print "tmp status: $?\n"; $out = `ls /foo`; print "foo status: $?\n"; __END__ tmp status: 0 ls: /foo: No such file or directory foo status: 256
|
|---|