Just to clarify, there are no line-endings in this file (at least not in ASCII).
I do think I found the problem, though. I didn't realize that perl was trying to find the end of line. Searching for that, I found "slurp mode", -0777 (undefined record separator). And using a few other recommendations, I also reduced the s///sgx options to just s///g, since my example didn't seem to need s and x. It seems to allow the file to be processed in a matter of seconds, and compares properly to other files processed "manually" with hex editors.
perl -0777 -pe "s/\x00\x42\x00\x11/\x00\x42\x00\xf0/g" input > outputI'm waiting on the availability of another file to test another hex string against, but it won't be available until Oct 1. I think the issue is resolved, but I'd like to wait until then to be sure, unless anyone else has any recommendations or considerations I should be aware of.
In reply to Re^2: Slow find/replace hex in Perl win32
by rickyboone
in thread Slow find/replace hex in Perl win32
by rickyboone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |