You don't want to do that. If 'foo' spans across one of those read blocks, then you'll miss the substitution.find . -name "*.html" -type f -print0 | perl -i -p0e \ 'BEGIN{ @ARGV = <STDIN>; chomp @ARGV; $/ = \65536 }; \ while (<>) { s/foo/bar/g; print }'
In reply to Re: Re^2: Large scale search and replace with perl -i
by runrig
in thread Large scale search and replace with perl -i
by elbie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |