my @array; # contains various numbers my %hash = map {$numbers[$_] => $temps[$_]} 0 .. $#numbers; while (($key, $value) = each (%hash)) { if ($key == $array[$_]) { push @found, $key . $value; } }
In reply to hashes: testing for the presence of a key by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |