use charnames qw( :full ); use feature qw( say ); use Encode qw( encode_utf8 ); my $text = "\N{LATIN SMALL LETTER E WITH ACUTE}"; say length $text; # 1 my $utf8 = encode_utf8($text); say length $utf8; # 2