in reply to Re: Slow find/replace hex in Perl win32
in thread Slow find/replace hex in Perl win32

You're using perl -ne without a print in the executed chunk. Does junk.dat have any size?

Not that that is likely to affect reading the source file ...

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Replies are listed 'Best First'.
Re^3: Slow find/replace hex in Perl win32
by BrowserUk (Patriarch) on Sep 29, 2010 at 21:13 UTC

    You're right. That's a typo. It takes five minutes when writing the data back to the disk.

    [22:01:55.40] C:\test>perl -pe "s/\x00\x42\x00\x11/\x00\x42\x00\xf0/sg +" 834245.masks >junk.dat [22:06:46.76] C:\test>perl -pe "s/\x00\x42\x00\x11/\x00\x42\x00\xf0/sg +" 834245.masks >junk.dat [22:09:31.99] C:\test>

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.