use strict; use Data::Dumper; my %h1=( 'camel' => 'flea', 'frog' => 'green', 'jabberwocky' => 'eh?', ); my @a1=qw/frog camel/; # Hash slice is on the right hand side of assignment below my @a2=@h1{@a1}; print Dumper(\@a2); __END__ $VAR1 = [ 'green', 'flea' ];
CU
Robartes-
In reply to Re: Need help
by robartes
in thread getting array of values from hash
by twinsen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |