Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Subarray in a hash: Can't use string ("STRING") as a HASH ref while "strict refs" in use

by AnomalousMonk (Archbishop)
on Apr 08, 2014 at 17:58 UTC ( [id://1081533]=note: print w/replies, xml ) Need Help??


in reply to Subarray in a hash: Can't use string ("STRING") as a HASH ref while "strict refs" in use

Had you been using warnings, Perl would have given you some hints that might have been enlightening:

c:\@Work\Perl\monks>perl -wMstrict -le "my @array_of_hashes; for (my $i=1; $i<=10; $i++) { $array_of_hashes[$i] = ( stuff => 'stuffy', goes => 'gooey', here => \"more $i\" ); $array_of_hashes[$i]{sub_data}[6] = \"seven\"; } " Useless use of a constant (stuff) in void context at -e line 1. Useless use of a constant (stuffy) in void context at -e line 1. Useless use of a constant (goes) in void context at -e line 1. Useless use of a constant (gooey) in void context at -e line 1. Useless use of a constant (here) in void context at -e line 1. Can't use string ("more 1") as a HASH ref while "strict refs" in use a +t -e line 1.
  • Comment on Re: Subarray in a hash: Can't use string ("STRING") as a HASH ref while "strict refs" in use
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 17:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found