Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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."


Comment on Re: die and subroutine combo
Download Code

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 romping around the Monastery: (13)
As of 2014-12-29 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (192 votes), past polls