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' }
In reply to Re: Re: Re: Re: What should be returned in scalar context? (best practice)
by Juerd
in thread What should be returned in scalar context?
by tilly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |