http://www.perlmonks.org?node_id=11106002


in reply to Fetch array of values from hashref

I think that code must be expressive, so it's nice when you use slices this way:
my $h = { foo => 1, bar => 2 }; @{ $h }{qw/ foo bar /} = ( 667, 889 ); # or postfix form: # $h->@{qw/ foo bar /} = ( 667, 889 );
But for your problem, more clear solution would be:
my @ar = values %$h; # or postfix form: # my @ar = values $h->%*;
You can read more about slices here:
perldoc perldata perldoc perlref