The binmode STDOUT, ':raw' is because you have already encoded your data. If you put STDOUT in UTF-8 mode, it will end up double-encoded.
If you are on a Windows system, the byte count discrepancy might be because Perl represents line breaks internally as line feed characters. When it does output it converts the line breaks to native format. If run on Windows, this adds one character per line. Putting the handle into ':raw' mode prevents this.
In reply to Re^2: Perl UTF-8 serving HTML5
by Anonymous Monk
in thread Perl UTF-8 serving HTML5
by $h4X4_|=73}{
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |