use Encode qw/from_to/; ... ... from_to($string, "cp850", "utf-8");