It does, but if you wanted case sensitive behaviour, the /$answer/i in your original code was wrong. In any case, just drop the ucs if that's what you need. One could also make that an option..
Don't worry about style, it's just a matter of experience. :-) Being a Pascalite, my first Perl scripts looked rather.. odd.