in reply to Specific hash to array conversion query
Here's a map solution (note that you can't depend on the order that keys provides, so if order matters you'll have to put a sort or two in there; I also assumed that there was just 0 and 1 keys in there):
Also note that your %properties = { ... } needs to be %properties = ( ... )my @values = map { ( [ $_, 0, $properties{$_}->{0}->{value} ], [ $_, 1, $properties{$ +_}->{1}->{value} ] ) } keys %properties;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Specific hash to array conversion query
by monarch (Priest) on Jul 12, 2005 at 02:51 UTC | |
by davidrw (Prior) on Jul 12, 2005 at 13:02 UTC |
In Section
Seekers of Perl Wisdom