http://qs321.pair.com?node_id=11128194


in reply to Forcing UTF-8 output on STDOUT

Do you really want to send the output to a file named STDOUT?

If not, use binmode instead of open:

#!/usr/bin/perl use utf8; use strict; use warnings; binmode *STDOUT, ':utf8'; print "åäöfoo\n";

Using :encoding(UTF-8) instead of :utf8 would turn on some useful checking, too.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]