Okay, but then why is it that as soon as I do my $STRING = shift; inside my sub, Perl's memory usage doubles (using TinyPerl 5.8 under Windows XP)?
It seems like it may be passed by reference, but as soon as you grab that using shift() or just do my $MYSTRING = $_[0]; then viola! You have another copy of the string!
In reply to Re^3: Passing argument by reference (for a scalar)
by harangzsolt33
in thread Passing argument by reference (for a scalar)
by jmClifford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |