Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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

by choroba (Archbishop)
on Dec 05, 2016 at 14:06 UTC ( #1177213=note: print w/replies, xml ) Need Help??

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

OK, so you first assign a name, so probably a string to $plants->[$i]{common} :
$plants->[$i]{'common'} = $plants->[$i]{'common_name'};

And few lines later, you try to store something in a hash ref:

$plants->[$i]{'common'}->[$jctr]{'sizes'} = $sizes->[$j]{'plantsiz +e'}.$sizes->[$j]{'unit'}; # ~~~~~~~~~~~~~~~~~~~~~~~

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.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1177213]
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: (4)
As of 2022-01-22 08:43 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (62 votes). Check out past polls.