minixman has asked for the wisdom of the Perl Monks concerning the following question:
What would be the best way to loop over it and say So a counter will hold the number of elements in the hash so my $count = 4; then i just want to loop over each without knowing the key or key valuesmy %file_attachments = ( '1 => { 'price' => '10.00', 'desc' => 'the 1st test'}, '2' => { 'price' => '12.00', 'desc' => 'the 2nd test'}, '3' => { 'price' => '13.00', 'desc' => 'the 3rd test'}, '4' => { 'price' => '14.00', 'desc' => 'the 4th test'} );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Looping through hash of hashes
by GrandFather (Saint) on Nov 26, 2005 at 10:44 UTC | |
|
Re: Looping through hash of hashes
by TedPride (Priest) on Nov 26, 2005 at 15:04 UTC | |
by minixman (Beadle) on Nov 26, 2005 at 16:55 UTC | |
|
Re: Looping through hash of hashes
by tirwhan (Abbot) on Nov 26, 2005 at 10:47 UTC | |
by minixman (Beadle) on Nov 26, 2005 at 12:23 UTC | |
by jonadab (Parson) on Nov 26, 2005 at 12:51 UTC |