Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^2: Return value from function

by perlCrazy (Monk)
on Jul 12, 2007 at 17:47 UTC ( [id://626289] : note . print w/replies, xml ) Need Help??

in reply to Re: Return value from function
in thread Return value from function

Thanks for reply.
Is this the best option ? why not pass reference then copy locally instead of returning from function directly.
How much difference this will make and what should be the best prcatice.
Also if checking the retrun value from calling function, in case of Hash, if we do like that if (%hash), then this will
not work in all case. If we return ref, then we can test easily like that, if ($ref). Any suggestions or opinion ?