![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: utf8 output with 5.8by Arrowhead (Monk) |
on Oct 29, 2002 at 20:55 UTC ( #208871=note: print w/replies, xml ) | Need Help?? |
In 5.8 you can (and should) specify which encoding perl should use when writing. If you switch your environment to utf8 with something like then you should get the output you expected. A different way to do it (TIMTOWTDI) is to explicitly switch STDOUT to a different encoding using the newly repurposed binmode():
A third way is using the new use open pragma:
So to get your one-liner to work, it becomes:
I'm sure you'll be able to find your way to the documentation for these new perl5.8 features. A good start is the perluniintro manpage.
In Section
Seekers of Perl Wisdom
|
|