my %line=qw(A 1 B 1 C 1); my @tojoin = qw (W X Y Z); for my $l(sort keys %line){ for my $k(@tojoin){ $line{qq($l$k$_)}=1 for @tojoin } }; print qq($_\n) for sort keys %line ; -- Output --- A AWW AWX AWY ...snip... B BWW BWX ...snip... BZZ C CWW ...snip... CZZ
"Man cannot live by bread alone...
He'd better have some goat cheese and wine to go with it!"
In reply to Re: Updating A Hash Recursively
by NetWallah
in thread Updating A Hash Recursively
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |