In Perl, of course, you generally have the option of using pass by value or pass by reference.
Everything is passed by reference in Perl.
sub foo { $_[0] = 'bar'; } foo($a); print($a); # bar
Don't confuse "passing by reference" with "passing a reference".
In reply to Re: Refactoring Perl #7 - Remove Assignments to Parameters
by ikegami
in thread Refactoring Perl #7 - Remove Assignments to Parameters
by agianni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |