Be careful with that regex:
(lc($name) eq lc($string)) and ($name =~ /$string/i) are not the same, as the regex will match any occurance of $string within $name (ie, substrings of $name, as well).
For the original poster -- have you considered using a case insensitive hash? See Tie::CPHash
In reply to Re^2: when do i know that the iterator for a hash was reseted
by jhourcle
in thread when do i know that the iterator for a hash was reseted
by rminner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |