I was just thinking about hash slices the other day, and wondering: what is the syntax for slicing a hash -reference-? I always end up doing things like
($hashref->{key1}, $hashref->{key2}) = @values;or
{map {$keynames[$_]=>$values[$_]} 0 .. $#values};which seems much less elegant.
In reply to Re: Populating a hash from array
by ryantate
in thread Populating a hash from array
by TASdvlper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |