in reply to Re: I need help with the error "Modification of non-creatable array value attempted"
in thread I need help with the error "Modification of non-creatable array value attempted"
Thanks for the reply but I've already found the error. I've updated the code to what it currently is, EXCEPT that I've left the $number/= 2; line (which made the error appear). It seems that it tried to assign a $number % 2 to an element of an array, but it couldn't since $number wasn't guaranteed to be a whole number (and I guess that makes % fail), I've changed the $number/= 2; to $number = int($number/ 2) and now it works perfectly :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: I need help with the error "Modification of non-creatable array value attempted"
by Athanasius (Archbishop) on Jul 14, 2014 at 17:17 UTC | |
Re^3: I need help with the error "Modification of non-creatable array value attempted"
by davido (Cardinal) on Jul 14, 2014 at 17:09 UTC |
In Section
Seekers of Perl Wisdom