Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: Question regarding handling exceptions in subroutine

by karlgoethebier (Parson)
on May 12, 2013 at 12:23 UTC ( #1033193=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Question regarding handling exceptions in subroutine
in thread Question regarding handling exceptions in subroutine

Shouldn't it be:

my $result = qx($command); if ( $? >> 8 != 0 ) { if ($@) { die $@; } else { die qq(Something really weird happened!); } }

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033193]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2016-07-23 14:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (220 votes). Check out past polls.