in reply to use encoding affects pack()
encoding's stated purpose is to handle scripts written in encodings other than iso-latin-1, but as explained already, it affects other things as well.
Due to other problems with the module (but possibly including this problem), use of encoding is seen as buggy by Perl's authors.
Script's encoding:
Output encoding:
Sounds like you need use open qw( :std :bytes );.
If your script is UTF-8 encoded, you'll need use utf8; as well.
|
|---|