in reply to Re: regex question with balanced text
in thread regex question with balanced text

If I use the here doc, how do I use this in conjunction with xargs? I thought that required it to be a one-liner?

find /home/site/htdocs -name "*.html" | xargs -n 1 perl -pi <<'PRG_END +' s|<!--#include virtual="/ssi/footer.txt"-->|<?php include(\$_SERVER['D +OCUMENT_ROOT'].'/ssi/footer.txt'); ?>|g; PRG_END

Thows errors like this:

Can't open perl script "s|<!--#include": No such file or directory. Use -S to search $PATH for it. Can't open perl script "virtual=/ssi/edfooter.txt-->|<?php": No such f +ile or directory. Use -S to search $PATH for it. Can't open perl script "include($_SERVER[DOCUMENT_ROOT]./ssi/edfooter. +txt);": No such file or directory. Use -S to search $PATH for it. Can't open perl script "?>|g;": No such file or directory. Use -S to search $PATH for it.

I learn more and more about less and less until eventually I know everything about nothing.