- or download this
$hash{"0"}=["1","2","15"];
$hash{"1"}=["3","4"];
...
use Data::Dumper;
print Dumper(\@expanded);
- or download this
sub expand
{
my ($key) = @_;
return sort { $a <=> $b } $key, map { expand($_) } @{$hash{$ke
+y}}
}
- or download this
sub e{@_,map{e($_)}@{@hash{@_}}}
print Dumper[map{[sort{$a<=>$b}e$_]}@{$hash{0}}]