use utf8; # upgrades your strings my $city = "Sprîngfíèld"; binmode(STDOUT, ":encoding(utf-8)"); print $city, "\n"; # use decode_utf8() when reading from e.g. a file # alternatively, see the binmode() call above use Encode 'decode_utf8'; my $input_raw = ; my $input = decode_utf8($input_raw); print $input, "\n";