my $zeta_zeta = <>; # read the input from somewhere my $str = decode('Latin-1', $zeta_zeta); my $html = <<'HTML'; Hello World HTML $html .= encode('UTF-8',$str); print $html;