The same applies to non-objects as well. Everything is passed by reference in Perl.
sub func { $_[0] = "bar"; } my $s = "foo"; func($s); print("$s\n"); # bar
In reply to Re: VB-ish behaviour byVar or byRef of objects in Perl
by ikegami
in thread VB-ish behaviour byVar or byRef of objects in Perl
by jbrugger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |