The simplest way is to just force every use to lower-case:
my %assoc = (); $assoc{lc('TheKey')} = 'test'; print $assoc{lc('TheKEY')}, $/;
(Added) Take a look at Hash::Case. It has Hash::Case::Lower, which uses a tied hash to enforce lower case keys. Sounds like just what you want.
After Compline,
Zaxo
In reply to Re: case-insensitive hash keys
by Zaxo
in thread case-insensitive hash keys
by ManFromNeptune
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |