http://qs1969.pair.com?node_id=830957


in reply to encoding of file names

Perl treats file names as opaque strings of bytes*. In unix, they are usually characters encoded using the current locale, which in turn, is usually UTF-8.

You need to decode the file names, and you'll be all set.

* — This presents a problem on Windows which stores them as characters, but that's not relevant here.