in reply to Matching value in hash help!
Your hash is inside out.
my %locs_by_wind_dir; for my $loc (keys(%wind_dir)) { for my $wind (split /,/, $wind_dir{$loc}) { push @{ $locs_by_wind_dir{$wind} }, $loc; } } print("$_\n") for @{ $locs_by_wind_dir{'AE'} }; # Loc A, Loc B
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Matching value in hash help!
by Anonymous Monk on Sep 24, 2010 at 02:06 UTC | |
by Anonymous Monk on Sep 24, 2010 at 05:01 UTC | |
by ikegami (Patriarch) on Sep 24, 2010 at 14:16 UTC |