|
|
| Do you know where your variables are? | |
| PerlMonks |
Modifying passed-in variablesby mike65535 (Novice) |
| on Nov 02, 2015 at 18:31 UTC ( [id://1146734]=perlquestion: print w/replies, xml ) | Need Help?? |
|
mike65535 has asked for the wisdom of the Perl Monks concerning the following question:
Monks- I'm trying to modify directly, a subroutine's passed-in variable. I've distilled it to the following (but had to hand-type; I hope I didn't introduce new errors!)
Perl throws an error at the $$data++ line. 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!
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||