print "Content-Type: text/html\n\n";

Always include the encoding, ie Content-Type: text/html; charset=utf-8\n\n (or let CGI generate that for you, you use it anyway).

Also you have to pass a scalar as the first argument to from_to, not an array. Read the docs for usage information.


In reply to Re: Weird encoding after grabing filenames by moritz
in thread Weird encoding after grabing filenames by Nik

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":