in reply to Re: Re: Reducing HoH to AoA
in thread Reducing HoH to AoA
Cheers - L~Rmy $end = []; for my $key ( keys %$start ) { next if ! exists $start->{$key}; my @values = ($key , keys %{ $start->{$key} }); push @$end , \@values; Eradicate( @values ); } sub Eradicate { delete @{ $start }{ @_}; for my $key ( keys %$start ) { delete @{ $start->{$key} }{ @_ }; } } print Dumper( $end );
|
|---|