Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Another "Can't use string as an ARRAY ref"

by haukex (Bishop)
on Dec 05, 2016 at 14:02 UTC ( #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? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2022-01-25 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (67 votes). Check out past polls.

    Notices?