Perl’s two types of strings
- Each Perl scalar has a flag for bytes vs codepoints
- Confusingly called the “utf8” flag
- Perl’s internal character storage is similar to but not exactly UTF-8
my $bytes = <$fh>; my $characters = Encode::decode('UTF-8', $bytes); $bytes = Encode::encode('UTF-8', $characters);