in reply to illegal mix of collations

Since nobody has answered you so far, I'll try to give it a shot.

When you write use encoding 'cp1250'; it doesn't magically mean that everything you do is magically in the cp1250 encoding; it really means that you declare your source code to be in that encoding, and that operations on STDIN and STDOUT work in that encoding, too.

At the same time you lose thread safety, and introduce bugs with AUTOLOAD methods.

Instead you should try to understand the string model in Perl. For that I recommend reading this article and/or the wikibook.

Then you have to get proper Perl strings out of your database; typically that works by upgrading your perl database driver (some DBD:: modules) to a rather new version, and pass some encoding related options to the DBI->connect call. More information can be found in the documentation of the appropriate DBD:: module.

Then you have to take care that data from other sources is also decoded from their current character encoding into perls internal string format, and are encoded on output again.

I recommend writing the script in UTF-8 and use the utf8 pragma (which is much less bug ridden than the encoding pragma), and either set up the IO layers manually, or use the open pragma to do that for you.

Perl 6 - links to (nearly) everything that is Perl 6.