Thank you for the response. The fourth paragraph of my initial post explains why I'm using binmode rather than this solution.
Your additional notes are good advice, but I omitted error checking, etc., from my example because I simplified my code to include only the relevant bits. I apologize for not stating this explicitly; I wrongly presumed it was clear from constructions like if 1 that are pointless in production code. (In practice I use autodie to avoid having to individually check every open with identical logic or to write my own open wrapper.)
In reply to Re^2: using binmode() to override default encoding specified in "use open"
by raygun
in thread using binmode() to override default encoding specified in "use open"
by raygun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |