in reply to
Re^2: DWIM with non ASCII characters
in thread DWIM with non ASCII characters
Why use utf8;? As I understand the documentation, its purpose is to enable the source code to be in UTF-8
Yes, that way you avoid concatenating decoded and non-decoded strings.
Of course it requires your script to be actually stored in UTF-8. But since the more general solution (use encoding $your_encoding) is severly broken (wrt to AUTOLOAD, thread safety and other issues), that's currently the only sane way to store non-ASCII Perl programs.
As for the rest, I can only agree to what ikegami wrote; using IO layers is much more convenient than using encode() and decode() on every IO operation. More importantly since there are fewer spots you have to care about encoding, the probability of forgetting it somewhere (and getting Mojibake in response) is much lower.
- links to (nearly) everything that is Perl 6.