Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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?
[Yaerox]: Is there any recommended perl-module for an CSPRNG in 2016?
[ambrus]: Yaerox: good question, I don't know

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2016-12-06 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (101 votes). Check out past polls.