Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my %hash = map { $numbers[$_] => $signs[$_]} 0 .. $#numbers; while (($key, $value) = each (%hash)) { if (@new_numbers) { for (my $i=0; $i<@new_numbers; $i++) { if ($key == $new_numbers[$i]) { print "$value \t $new_numbers[$i]"; # th +is prints the sign and the number it matches to } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash problems
by murugu (Curate) on Jul 08, 2004 at 11:09 UTC | |
by Anonymous Monk on Jul 08, 2004 at 11:17 UTC | |
|
Re: hash problems
by PerlingTheUK (Hermit) on Jul 08, 2004 at 11:13 UTC | |
|
Re: hash problems
by Roy Johnson (Monsignor) on Jul 08, 2004 at 14:04 UTC | |
|
Re: hash problems
by perldeveloper (Scribe) on Jul 08, 2004 at 11:11 UTC |