Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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.


Comment on Re^2: calling sub and returning value from the same line
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
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 scrutinizing the Monastery: (9)
As of 2015-07-08 07:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls