in reply to Re: Compare hash with arrays and print
in thread Compare hash with arrays and print
my %rhash = reverse %hash; my %fh; foreach my $num (keys %rhash)
Since you only need the unique keys from %hash you only really need an array:
my @keys = keys %{{ reverse %hash }}; my %fh; foreach my $num ( @keys )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Compare hash with arrays and print
by Marshall (Canon) on Jul 12, 2010 at 23:47 UTC |