in reply to print hash of hashes as lists
$evilhash->{1} = { red => 1, blue => 2, green => 3, }; my @colors = qw( red blue green ); print join("|", @{$evilhash->{1}}{@colors}), "\n";
(thank you Data::Dumper)$evilhash = { '1' => { 'blue' => 2, 'green' => 3, 'red' => 1 } };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: print hash of hashes as lists
by perigeeV (Hermit) on May 29, 2001 at 06:03 UTC | |
by meonkeys (Chaplain) on May 31, 2001 at 03:50 UTC |