Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: die and subroutine combo

by crouchingpenguin (Priest)
on Oct 08, 2003 at 13:22 UTC ( [id://297571]=note: print w/replies, xml ) Need Help??


in reply to die and subroutine combo

Simply use the comma operator between your die and your call to mysub() like so:

sub mysub { mail stuff here.. } open(TMPFILE,"<datafile.txt") || die "Cant open: $!", mysub();

cp
----
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."

Log In?
Username:
Password:

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

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

    No recent polls found