Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: die and subroutine combo

by crouchingpenguin (Priest)
on Oct 08, 2003 at 13:22 UTC ( #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
Node Status?
node history
Node Type: note [id://297571]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2016-06-26 17:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (331 votes). Check out past polls.