http://www.perlmonks.org?node_id=326975


in reply to Case insensitive hash keys

Hash::Case::Preserve is what you want.
use Hash::Case::Preserve; tie my(%hash), 'Hash::Case::Preserve'; $hash{StraNGeKeY} = 3; print keys %hash; # StraNGeKeY print $hash{strangekey}; # 3 print $hash{STRANGEKEY}; # 3
See especially the note about first or last use case preservation.