Encode::_utf8_off $buf;
Encode::_utf8_on $str;
If we are sure, that input data is valid utf8 string.
my $success = utf8::decode $buf;
The UTF-8 flag is turned on only if the source string contains multiple-byte UTF-8 characters.
To install Pcore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pcore
CPAN shell
perl -MCPAN -e shell install Pcore
For more information on module installation, please visit the detailed CPAN module installation guide.