in reply to Re: Substr cannot extract last special character
in thread Substr cannot extract last special character

In particular, if you embed utf8 chars in the program source, you have to let perl know with the utf8 pragma:
my $x ='Ù'; print length($x), "\n"; # prints 2
compared with
use utf8; my $x ='Ù'; print length($x), "\n"; #' prints 1

Dave.