in reply to Reoccuring message
Although use strict; is highly recommended (almost to the point of mandated:-) by monks far more knowledgeable than me, in this case, the behaviour would be identical to that observed - which, IMHO, might provide a use case for the improvement of perl itself by way of identifying the variable that it considers to be read-only within the error message - sometimes I've struggled to try and spot problems such as this.
Anyway, in for ($1 = 0; $i <= 10; $i++) {, you assign a value of 0 to $1, methinx that you meant to write for ($i = 0; $i <= 10; $i++) {, or even for (my $i = 0; $i <= 10; $i++) {.
I would also point out that, strictly speaking, the message isn't Reoccuring since it only occurs once per run.
Update:
Thanx to AnomalousMonk (I do like like name:-), added my to 2nd suggestion.
A user level that continues to overstate my experience :-))
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Reoccuring message
by Lotus1 (Vicar) on Sep 07, 2018 at 02:35 UTC |
In Section
Seekers of Perl Wisdom