Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: die and subroutine combo

by broquaint (Abbot)
on Oct 08, 2003 at 11:08 UTC ( [id://297535]=note: print w/replies, xml ) Need Help??


in reply to die and subroutine combo

You could just use a simple do e.g
open(TMPFILE,"<datafile.txt") or do { mysub(); die "Cant open: $!" };
Or if you want it performed across the board you could create a die signal handler e.g
$SIB{__DIE__} = sub { mysub(); die @_ };
See. the die docs for more info.
HTH

_________
broquaint

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-23 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found