Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: Re: What should be returned in scalar context? (best practice)

by Juerd (Abbot)
on Dec 21, 2003 at 18:00 UTC ( #316222=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: What should be returned in scalar context? (best practice)
in thread What should be returned in scalar context?

But if you say return @ret you aren't returning a list when called in scalar context.

While that is true, it is *never* returning an array in any context. At least when you say list, that's some indication you should use the sub in list context :)

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }


Comment on Re: Re: Re: Re: What should be returned in scalar context? (best practice)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-04 07:54 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 (58 votes), past polls