in reply to hash of lists - hash of hashes
I tried to get something along the lines of the following bit of code to work but couldn't:while (($k, $lref) = each %HoL){ $HoL{$k}={map {$_,1} @$lref}; }
I'm sure merlyn could blow this out of the water (and I hope he does, I'd love to see his solution... probably something really slick w/ 2 maps)%HoL=map {map {$_,1} @HoL{$_}} keys %HoL;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: hash of lists - hash of hashes
by visnu (Sexton) on Jun 13, 2000 at 04:12 UTC |