XP is just a number | |
PerlMonks |
Re: Another "Can't use string as an ARRAY ref"by choroba (Cardinal) |
on Dec 05, 2016 at 14:06 UTC ( [id://1177213]=note: print w/replies, xml ) | Need Help?? |
OK, so you first assign a name, so probably a string to $plants->[$i]{common} :
And few lines later, you try to store something in a hash ref:
The underlined thing is a string (comment mine). You can't use a string as a hash ref under strict. BTW, is $jctr ever different to $j (and $kctr to $k )? If not, you can improve readability by dropping two variables.
In Section
Seekers of Perl Wisdom
|
|