Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^5: binmode i/o for perl -pi in-place editing

by pryrt (Abbot)
on Dec 09, 2016 at 14:44 UTC ( [id://1177543]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1177543]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-03-29 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found