I like hash slices:
($one, $two, $three) = @hash{ qw/aaa bbb ccc/ };
Sadly, this doesn't work as an lvalue:
@hash{ qw/aaa bbb ccc/ } = ($one, $two, $three); # WRONG
But this does:
push @values, reverse @keys;
$hash{ $values[$#values - $_] } = $values[$_] for 0 .. @values / 2 - 1;
$#values /= 2;
--
Gaal Yahas <[EMAIL PROTECTED]>
http://gaal.livejournal.com/
