in reply to Re: can 'warn' but not 'print' wide character
in thread can 'warn' but not 'print' wide character

What timing! Are you in on that bug system? I believe 'die' needs the same fix.

This code from the bug report:

perl -we '$a="\xee\n"; print STDERR $a; warn $a; utf8::upgrade($a); pr +int STDERR $a; warn $a'

gives the same results as this:

perl -we '$a="\xee\n"; print STDERR $a; die $a;' perl -we '$a="\xee\n"; utf8::upgrade($a); print STDERR $a; die $a'

Thanks!

Replies are listed 'Best First'.
Re^3: can 'warn' but not 'print' wide character
by ikegami (Patriarch) on Sep 17, 2010 at 18:19 UTC

    I don't know if it was fixed by the same patches or by different patches, but die() will warn too in 5.14.

    $ ./perl -v This is perl 5, version 13, subversion 4 (v5.13.4-312-g6e4e365) built +for i686-linux ... $ ./perl -e'warn chr 300' Wide character in warn at -e line 1. Ĭ at -e line 1. $ ./perl -e'die chr 300' Wide character in die at -e line 1. Ĭ at -e line 1.