Encode-Encoder

Encode::Encoder(3p) Perl Programmers Reference Guide Encode::Encoder(3p)

Encode-Encoder

Encode::Encoder(3p) Perl Programmers Reference Guide Encode::Encoder(3p) # Encode::Encoder(3p) Perl Programmers Reference Guide Encode::Encoder(3p) NNAAMMEE # Encode::Encoder -- Object Oriented Encoder SSYYNNOOPPSSIISS # use Encode::Encoder; # Encode::encode("ISO-8859-1", $data); Encode::Encoder->new($data)->iso_8859_1; # OOP way # shortcut use Encode::Encoder qw(encoder); encoder($data)->iso_8859_1; # you can stack them! encoder($data)->iso_8859_1->base64; # provided base64() is defined # you can use it as a decoder as well encoder($base64)->bytes('base64')->latin1; # stringified print encoder($data)->utf8->latin1; # prints the string in latin1 # numified encoder("\x{abcd}\x{ef}g")->utf8 == 6; # true. ...