Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Hashes of Hashes of Arrays? Is it possible?

by toolic (Bishop)
on Sep 08, 2011 at 18:43 UTC ( #924901=note: print w/replies, xml ) Need Help??


in reply to Hashes of Hashes of Arrays? Is it possible?

You seem to be on the right track. What is your expected output?
use warnings; use strict; use Data::Dumper; $Data::Dumper::Sortkeys = 1; my %HOH; my $key = 'foo'; my $value = 5; my $value2 = 6; $HOH{$key}{"name"} = $value; push(@{$HOH{$key}{"price"}}, $value2); push(@{$HOH{$key}{"price"}}, 99); print Dumper(\%HOH); __END__ $VAR1 = { 'foo' => { 'name' => 5, 'price' => [ 6, 99 ] } };
That shows an array of prices.

perldsc

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2022-01-16 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (49 votes). Check out past polls.

    Notices?