in reply to Charset tornment

I think you're on the right track with use utf8, but the error message you get suggests that your input and/or program file may not be saved in that encoding. Try saving both the input file and the Perl script in UTF-8 and see what happens (most modern text editors let you set the encoding). You can check that the conversion worked by viewing the documents in a Web browser, for example, with UTF-8 selected as your charset.