in reply to getting array of values from hash
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 |