Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: hash of hashes

by AnomalousMonk (Chancellor)
on Oct 06, 2013 at 05:39 UTC ( #1057120=note: print w/replies, xml ) Need Help??


in reply to Re^2: hash of hashes
in thread hash of hashes

$hash{$d}{$i}=$line[$i];

At this point in the code,  $d is a fruit,  $i is an index (a number), and  $line[$i] is a color (AFAIU your code). Why would you want to associate a number with a fruit and a color with a number (perhaps better expressed as) a fruit with a number and a number with a color? Please take a look at Re^3: hash of hashes.

Also, try using Data::Dumper or Data::Dump (my favorite) for looking at data structures — much more convenient.

And again, please take a look at perldsc.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1057120]
help
Chatterbox?
[Discipulus]: hello monks and nuns! all was well inmy absecnce?
[1nickt]: Tutto bene, Discipulus
[jedikaiti]: Well, the Monastery is still standing, so the party wasn't that epic
[Discipulus]: ;=) I will unavailable this week during eu morning time: I'm following a redhat 7 basci course, finally

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2017-12-11 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (308 votes). Check out past polls.

    Notices?