Do you have "use strict;" at the top of this script? I can reproduce your error. But when strict is added I get a warning about a reference in the line with the increment. You probably have a numerical value in $rs_RecurseLabel, which is not valid in a reference such as $$rs_RecurseLabel.
Addendum: As I play with this further, I see
tye is correct. Something is goofy with the prototyping. You must declare prototyped subs before the code that calls them. When I put the calling code after the prototyped sub, the prototype automatically creates a reference to your variable and the read-only error goes away. When the sub is after the call, I can get your same error. Also, it is not idiomatic to modify parameters in place like this, especially with nothing in the function call to specify that the third parameter will be treated as a reference. You may want to explore a different approach, such as changing the value via a return value.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.