Yeah, I ended up using something similar to your non-pi script to actually do the processing yesterday. (And today, I was able to follow shmem's suggestions to get the -pi working)

My searches indicate that debug.exe hasn't shipped with Win7(1,2) (or probably beyond), though it did ship with Windows XP(3). Regardless of normal, my Win7 64bit installation doesn't include it. I just used xxd, because it was faster than rolling my own hex dumper in perl -- though I should have, once I was trying to bring fellow Monks to help me. :-)

I was just using null-separated text for easy-to-create dummy data. Really, it is a binary data format, which can have the bytes 0x0A and 0x0D anywhere (not really functioning as newlines), but occasionally has embedded strings; I was trying to edit some of those occasional strings (and I couldn't get my GnuWin32 sed.exe to do the changes I wanted -- I was probably not escaping something correctly on the command line -- so I switched to perl, because I thought it would be easier (and I wanted to learn more about the -pi options, since I'd never used that combination, I'd normally just rolled my own file loop, like I ended up doing.)

Again, everyone, thanks for your help and suggestions. I've learned more, which is always my goal here.


1 http://superuser.com/questions/510671 /is-there-debug-exe-equivalent-for-windows7: implies it doesn't ship with Win7
2 http://www.computerhope.com/forum/index.php?topic=129058.0: implies it doesn't ship with Win7
3 https://technet.microsoft.com/en-us/library/bb491040.aspx: did ship with XP


In reply to Re^2: binmode i/o for perl -pi in-place editing by pryrt
in thread binmode i/o for perl -pi in-place editing by pryrt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.