Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 chanting in the Monastery: (7)
As of 2014-12-27 15:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (177 votes), past polls