in reply to encoding problem om Ubuntu Linux

Perl generally handles UTF-8 and Unicode very well, but there's a limit: file names. Linux doesn't have an encoding-aware API for file name operations, so it's not really perl's fault.

That being said, the normal approach is to decode the data from the outside world into text strings, work with it, and encode it back to byte strings before you print it or perform operations on the file system.

However, if file names and input data have the same encoding, everything (except some string operations like substr and regex matches) should work just fine. Which suggests that some of your data or file names have a different encoding than the system default of UTF-8.

There's a lot to say about it, and I already said much here. There's also perluniintro, the excellent Encode module (it's a core module), and perlunicode.