Of course I haven't tested this, but I don't see why it wouldn't work. With uc() you're not really ignoring case, but uppercasing everything just to make sure they match. (kinda like an SQL approach). Le'me know if that works!foreach $key (keys %food_color) { if (uc($key) eq uc($new_key)) { $food_color{$key} = $new_value; } }
In reply to Re: Case insensitivity in a hash... Futile effort?
by BBQ
in thread Case insensitivity in a hash... Futile effort?
by ChuckularOne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |