Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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??


in reply to Another "Can't use string as an ARRAY ref"

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,
-- Hauke D

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found