in reply to VB-ish behaviour byVar or byRef of objects in Perl
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: VB-ish behaviour byVar or byRef of objects in Perl
by webfiend (Vicar) on Dec 11, 2007 at 20:54 UTC | |
by Fletch (Bishop) on Dec 12, 2007 at 17:49 UTC |