Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Reoccuring message

by Bloodnok (Vicar)
on Jun 09, 2014 at 12:06 UTC ( #1089258=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1089258]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2020-10-24 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (242 votes). Check out past polls.

    Notices?