Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my @array_code= qw(WE4321 PP7654 8973 7865 TT3422); my %code_numbers = ( "4321" =>"XX", "7654" => "BB", "8973" => "" ); # Using the number part only of the array elements (@array_code), how +to search for a match into the hash %code_numbers and print # results like: WE4321 XX # PP7654 BB # if value is empty like will be for this # 8973 # add "IN",and get it like this: # 8973 IN
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Search Hash with array element Help!
by ikegami (Patriarch) on Mar 04, 2010 at 20:23 UTC | |
by snape (Pilgrim) on Mar 04, 2010 at 21:38 UTC | |
by ikegami (Patriarch) on Mar 04, 2010 at 22:45 UTC | |
|
Re: Search Hash with array element Help!
by jrsimmon (Hermit) on Mar 04, 2010 at 20:26 UTC | |
|
Re: Search Hash with array element Help!
by toolic (Bishop) on Mar 04, 2010 at 20:27 UTC | |
by Anonymous Monk on Mar 04, 2010 at 21:11 UTC | |
|
Re: Search Hash with array element Help!
by Corion (Patriarch) on Mar 04, 2010 at 20:23 UTC | |
|
Re: Search Hash with array element Help!
by snape (Pilgrim) on Mar 04, 2010 at 21:02 UTC |