in reply to extended problem
in thread hash of lists - hash of hashes
it's iterative no less. any comments?my ($key, $value, $len); while (($key, $value) = each %HoL) { my $href = $HoL{$key} = { map {$_, 1} @$value }; do { $len = keys %$href; for (@HoL{@$value}) { if (ref eq "HASH" ) { @$href{keys %$_} = (1) x (keys %$ +_) } elsif (ref eq "ARRAY") { @$href{@$_} = (1) x @$_ } } $value = [ keys %$href ]; } while (@$value > $len); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: extended problem
by visnu (Sexton) on Jun 14, 2000 at 03:32 UTC | |
|
RE: RE: extended problem
by visnu (Sexton) on Jun 13, 2000 at 11:40 UTC |