Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: return !!

by ikegami (Patriarch)
on Mar 04, 2009 at 20:33 UTC ( [id://748313]=note: print w/replies, xml ) Need Help??


in reply to Re: return !!
in thread return !!

you can save some cycles by not copying the entire data.

Since the context is surely scalar, it wouldn't copy the entire data anyway.

Replies are listed 'Best First'.
Re^3: return !!
by Limbic~Region (Chancellor) on Mar 04, 2009 at 20:43 UTC
    ikegami,
    I was speaking to the idiom not this specific example. For instance return $foo; where $foo is the contents of a large file. I also am not sure I agree that the author of the sub can be sure that the caller of the sub would be calling it in scalar context - making the explicit scalar useful.

    Cheers - L~R

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 01:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found