mike65535 has asked for the wisdom of the Perl Monks concerning the following question:
Perl throws an error at the $$data++ line.my $data = 3; foo { my ($data) = @_; $$data++; }
I've looked at some sample Perl scripts that appear to operate this way.
I've looked over Common Causes for "Modification of a read-only value attempted" but it hasn't helped me.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Modifying passed-in variables (named aliases)
by LanX (Saint) on Nov 02, 2015 at 18:50 UTC | |
|
Re: Modifying passed-in variables
by mr_ron (Deacon) on Nov 02, 2015 at 19:32 UTC | |
by mike65535 (Novice) on Nov 03, 2015 at 13:50 UTC | |
by Preceptor (Deacon) on Nov 03, 2015 at 14:49 UTC | |
by AnomalousMonk (Archbishop) on Nov 03, 2015 at 17:56 UTC | |
|
Re: Modifying passed-in variables
by tonto (Friar) on Nov 02, 2015 at 18:58 UTC |