in reply to Re^2: Search a hash case insensitive
in thread Search a hash case insensitive
my %seen; while (my $line = <PFILE>) { @ID = split(/:/, $line); my $id = $ID[0]; if ($seen{lc($id)}++) { print "'$id' is duplicate\n"; } }
Note you had incorrect syntax for accessing a list element. I would also recommend against using variables with the same character sequence but different cases for names.
|
|---|