#!/usr/bin/perl use strict; use warnings; binmode STDOUT,":utf8"; my $tim = "abcdef \x{ff41}\x{ff42}\x{ff43}\x{ff44}\x{ff45}\x{ff46}"; Foo1Case::foo( $tim ); Foo2Case::foo( $tim ); package Foo1Case; sub ToUpper { return < ", uc($str), "\n"; } package Foo2Case; sub ToUpper { return < ", uc($str), "\n"; }