in reply to Checking and verifying a unix command sent in Perl

system already provides the child's exit code as its return value.

$ true $ echo $? 0 $ perl -le'print system("true") >> 8' 0 $ false $ echo $? 1 $ perl -le'print system("false") >> 8' 1

Echoing it and capturing it is a waste.