Shouldn't it be something like this?
Update:
OK, eval...
my $result; eval { $result = qx($command); }; if ( $? >> 8 != 0 ) { if ($@) { die $@; } else { die qq(Something really weird happened!); } } # do stuff with $result...
Regards, Karl
«The Crux of the Biscuit is the Apostrophe»
In reply to Re^4: Question regarding handling exceptions in subroutine
by karlgoethebier
in thread Question regarding handling exceptions in subroutine
by walkingthecow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |