Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: calling sub and returning value from the same line

by dpuu (Chaplain)
on Jan 09, 2005 at 21:00 UTC ( #420748=note: print w/replies, xml ) Need Help??


in reply to Re: calling sub and returning value from the same line
in thread calling sub and returning value from the same line

Another alternative is to replace the "and" operator with a comma:
open FH, ">$file" or error("msg"), return undef;
If you do this, you must use parentheses to call the "error" function.

--Dave
Opinions my own; statements of fact may be in error.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2023-09-25 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?