I'm glad to hear that the fix worked for you too!
The wide character warning is covered in the link that I mentioned in my last message. The URL is
http://www.ahinea.com/en/tech/perl-unicode-struggle.html
The relevant bit is the second-last section of that document. Specifically, add this to your code to tell perl that STDOUT accepts UTF-8: