Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: Question regarding handling exceptions in subroutine

by karlgoethebier (Vicar)
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»


Comment on Re^4: Question regarding handling exceptions in subroutine
Download Code

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 exploiting the Monastery: (16)
As of 2015-07-31 21:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (282 votes), past polls