We don't bite newbies here... much | |
PerlMonks |
Re: Another "Can't use string as an ARRAY ref"by haukex (Archbishop) |
on Dec 05, 2016 at 14:02 UTC ( [id://1177212]=note: print w/replies, xml ) | Need Help?? |
Hi bradcathey, One of the first things you do in your loop is assign $plants->[$i]{'common'} = $plants->[$i]{'common_name'};, but then later on you attempt to use $plants->[$i]{'common'}, which now holds a string, as an array ref when you write $plants->[$i]{'common'}->[$jctr]{'sizes'} = ..., that's where the error is coming from. Are you perhaps using the hash key common twice by accident? Hope this helps,
In Section
Seekers of Perl Wisdom
|
|