in reply to How to determine of script executed correctly?

You probably mean $? instead of #?. If you want your script to die on any error, use rather
if ($? != 0) { die "Command failed: $!"; } else { print "Command executed successfuly.\n"; }
But it really depends on the command itself and what exit status it returns in various situations.

Replies are listed 'Best First'.
Re^2: How to determine of script executed correctly?
by julio_514 (Acolyte) on Apr 20, 2012 at 21:41 UTC
    Yeah my bad it is indeed $?. Ok thanks, seems to work fine!