use Encode; my $data = "some utf8 string"; Encode::from_to( $data, "utf8", "utf16le" ); print $data;