# file name: test.pl # save it with utf8 encoding use Encode qw(decode_utf8); binmode STDOUT, ':utf8'; $string1 = "This is greek character 'y': ì"; print "Content-Type: text/html; charset=utf-8\n\n"; print decode_utf8 $string1;