in reply to Re^2: Modifying passed-in variables
in thread Modifying passed-in variables
Here are some guesses at what the proprietary code you have may resemble (more or less). Two have been discussed, bar() is new. All are valid constructs in the sense that they are not deprecated as of 5.14. Whether they are good ideas or not is another question. Please pick one of these as the closest to what you have:
c:\@Work\Perl>perl -wMstrict -le "print qq{perl version $]}; ;; sub foo { my ($data) = @_; $$data++; } ;; my $x = 3; foo(\$x); print $x; ;; sub bar (\$) { my ($data) = @_; $$data++; } bar($x); print $x; ;; sub bof { $_[0]++; } bof($x); print $x; " perl version 5.008009 4 5 6
Give a man a fish: <%-{-{-{-<
|
|---|