in reply to hash of lists - hash of hashes
%HoL = ( fruits => [ "orange", "banana", "kiwi" ],
vegetables => [ "carrot", "potato" ],
cheeses => [ "cheddar", "american" ]
);
to this:
%HoH = ( fruits => { orange => 1, banana => 1, kiwi => 1 },
vegetables => { carrot => 1, potato => 1 },
cheeses => { cheddar => 1, american => 1}
);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Turning Hash of Arrayrefs into Hash of Hashrefs
by merlyn (Sage) on Jun 13, 2000 at 04:33 UTC |