but of course were stopped by the fact that that's a syntax error? So you resort to eithermy @hash{@keys} = @values;
ormy %hash; @hash{@keys} = @values;
and that just didn't seem clean? Well, here's another idiom that borders on cool or wacky weird, depending on where you're from!my %hash = map { $keys[$_] => $values[$_] } 0..$#keys;
@$_{@keys} = @values for \my %hash;
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |