in reply to Re: Case insensitive hash key existance
in thread Case insensitive hash key existance
:P
if ( grep fc $str eq fc $_, keys %data ) { # case-insensitive exists
Or to "fix" the data-
$data{fc$_} = delete $data{$_} for keys %data;
As this example should make clear, and haukex's links explained, the entire operation is probably a bad idea as it is destructive (or at least has the appearance of being so if the plain folding is done without deleting.
|
|---|