Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: How to pass a variable to a subroutineby mikelieman (Friar) |
on Dec 05, 2008 at 16:16 UTC ( [id://728324]=note: print w/replies, xml ) | Need Help?? |
perlsub
The Perl model for function call and return values is simple: all functions are passed as parameters one single flat list of scalars, and all functions likewise return to their caller one single flat list of scalars. Any arrays or hashes in these call and return lists will collapse, losing their identities--but you may always use pass-by-reference instead to avoid this( perlreftut )
In Section
Seekers of Perl Wisdom
|
|