in reply to Can't decode ill-formed UTF-8 octet sequence

When you use utf8::all, among other things it will:
Filehandles are opened with UTF-8 encoding turned on by default (including STDIN, STDOUT, and STDERR when utf8::all is used from the main package). Meaning that they automatically convert UTF-8 octets to characters and vice versa. If you don't want UTF-8 for a particular filehandle, you'll have to set binmode $filehandle.

This means it adds the utf8 layer on your STDIN. Your STDIN is reading binary data, and will die because that binary data is not utf-8. Your options are to call 'binmode STDIN' to un-apply the utf-8 layer from STDIN, or to not use utf8::all and choose between calling utf8::encode on your string before printing it, or manually adding the utf8 layer to STDOUT: binmode STDOUT, ":utf8".

FWIW, on Windows you would need to call binmode STDIN; regardless of whether you use utf8:all, because windows default is to convert \r\n line endings on STDIN. Your example is exactly why perl5 can't just change the defaults to make utf8::all automatic. Sometimes people do want to read binary data from stdin or write it to stdout, and on Unix they've never needed to call binmode before, because it's the default.