in reply to Re^4: binmode i/o for perl -pi in-place editing
in thread binmode i/o for perl -pi in-place editing

++shmem. Today, when I try either

perl -Mopen=IO,:raw -pi.orig pi.pl src.bin

or

perl -Mopen=IN,:raw,OUT,:raw -pi.orig pi.pl src.bin

... it works (file length stays the same with the original). I could have sworn I'd tried the second version, but maybe I had mixed up my test cases, like you said. Good to know that it can actually be done using the -pi magic notation.

Thanks again.