http://qs321.pair.com?node_id=120184


in reply to passing subroutine arguments directly into a hash

One way of doing this assignment would be to use a hash slice on the left hand side of an assignment from @_:

sub f { my %hash; @hash{ qw/ h s d / } = @_; # ... }

(That hash slice is equivlent to ($hash{h}, $hash{s}, $hash{d}).)