in reply to getting array of values from hash

This can be done using hash slices. Basically prefix the hash variable name with the @ sigil and instead of the key, give it a list of keys. Here's an example:
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-

Replies are listed 'Best First'.
Re: Re: Need help
by twinsen (Initiate) on Mar 24, 2003 at 17:38 UTC
    It worked! Great, thank you! :)

    -Twinsen