1. 1
  1.  

  2. 1

    Some food for thought:

    my %hash = ( 'foo' => [1,2,3], 'bar' =>[3,4,5]);
    
    my @wantedKeys = qw(foo);
    
    my %wanted;
    
    @wanted{@wantedKeys} = @hash{@wantedKeys};
    

    http://perldoc.perl.org/perldata.html#Slices