Just lowercase the $id you use for the hash lookup:
my $id = $ID[0]; my $id_lc = lc $id; if ($ids{$id_lc}) { print "'$id' is duplicate\n"; } else { $ids{$id_lc} = 1; }
In reply to Re^3: Search a hash case insensitive
by Eliya
in thread Search a hash case insensitive
by Saved
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |