system() is one of those weird commands that do different things depending on their arguments. It you use a single string argument, the return status is the status of the shell (or CMD.EXE on Windows). Most often, this is zero (success) even if the shell could not find a program to run.
I'm not seeing that:
os x 10.4.11use strict; use warnings; use 5.010; my $status = system( "foobar arg1 arg2 arg3" ); say $status; --output:-- Can't exec "foobar": No such file or directory at 2perl.pl line 5. -1
In reply to Re: return value from system call, exit status, shift right 8, bitwise and, $?
by 7stud
in thread return value from system call, exit status, shift right 8, bitwise and, $?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |