We already showed you:
$hash{$_} = { %$value } for @keys;
or
$hash{$_} = { %value } for @keys;
The only concise alternative which comes to mind is
@hash{ @keys } = map { { %value } } @keys
But it's neither shorter nor easier to read.
Cheers Rolf
But honestly you should stick to syntax you understand, even if it takes some lines more.
In reply to Re^9: Combinations of lists, etc
by LanX
in thread Combinations of lists to a hash
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |