in reply to Accessing an executable from perl script

To get the error status from $abc_cmd, you can write:

system($abc_cmd) and die $? >> 8;

You can inspect $? in other ways: see system.

There are other variables you may want to check: see perlvar - Error Variables.

-- Ken

Replies are listed 'Best First'.
Re^2: Accessing an executable from perl script
by dpetrov (Acolyte) on Mar 02, 2012 at 15:17 UTC
    or using some module like autodie could be handy, here is a link https://metacpan.org/module/autodie