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


in reply to Is "die" the best way to be atomic?

Hi,

You also could rely on the calling shell to do it for you.

$rc=system(<<EOF); set -e ls this_command_does_not_exist EOF die if $rc;
But this solution fits more in the ShellMonks :-)

PS: I don't know why, but $? is not set!!


---------------------------
Dr. Mark Ceulemans
Senior Consultant
BMC, Belgium