use Text::Iconv; ......... my $converter = Text::Iconv->new('UTF-8', 'iso-8859-1'); $initfile = $converter->convert($initfile);