laziness, impatience, and hubris | |
PerlMonks |
Re: binary search/replaceby tilly (Archbishop) |
on Jan 26, 2011 at 12:57 UTC ( [id://884332]=note: print w/replies, xml ) | Need Help?? |
If you call quotemeta on $cut, you should get a string that makes this work. Alternately you can use index to find the location to replace, and then use substr to do the replacement. If you are on Windows, you will need to use binmode before reading in the data and substring to be sure that you are correctly loading the binary data.
In Section
Seekers of Perl Wisdom
|
|