use utf8; $x="\x{0103}"; use bytes; print length($x); #### use utf8; binmode(STDIN,":utf8"); $x=<>; chomp $x; use bytes; print length($x);