in reply to Re: Do and Die
in thread Do and Die

To expand - you might want a special case for -1 (unable to start the program)

my $retval = system( 'cmd' ); if ( $retval == -1 ) { die "Unable to start cmd!\n$!\n"; } elsif ( $? ) { die "Error returned from cmd! (".($?>>8).")\n$@\n"; }