use Encode; my $string; Encode::from_to($string, 'utf-16', 'utf-8');