in reply to system bash return value

Use either system or qx (aka backticks) and check $?

From perlop#Quote-Like-Operators

> Like system, backticks put the child process exit code in $? . If you'd like to manually inspect failure, you can check all possible failure modes by inspecting $? like this:

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!