Closed cmanley closed 1 year ago
Thanks for the report, but this works as documented. The allowed values for mode
are write
, >
, append
, or >>
. There's a separate binmode
param you can pass to the constructor which lets you set IO layers.
Thanks. I wasn't aware of the layer option to binmode().
See title. The problem is in sub new where it validates the mode. The validation doesn't take IO layers into account and defaults to '>>'. It'll also default to '>>' if close_after_write is true. Also side note: beware of using binmode with some IO layers such as gzip: that'll mess the output up.