in reply to User-Defined Case Mappings

The mistake you are making is never calling your subroutine. The sub ToUpper{} syntax just generates the code; to execute it you need to invoke it, with perhaps ToUpper();. A read through perlsub may be illuminating.

A great deal of effort has been put into dealing with complex character sets over the years. There's a decent intro to what you need to do to keep from shooting yourself in the foot in perlunitut.

Never mind: What Tanktalus said. OP's code is out of User Defined Case Mappings