http://www.perlmonks.org?node_id=1015143


in reply to Bash vs Perl. Why doesn't work...?

Are you getting any error message ? check the exist status of the system command

If you'd like to manually inspect system's failure, you can check all possible failure modes by inspecting $? like this:

if ($? == -1) { print "failed to execute: $!\n"; } elsif ($? & 127) { printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; } else { printf "child exited with value %d\n", $? >> 8; }