in reply to Error: sh: -c: line 0: unexpected EOF while looking for matching `''

Since you're relying heavily on shell commands anyway, why not just do it like this?
locate -b public_html | grep -v 'html\.' | xargs -I % find % -name '*.html' -print0 | xargs -0 grep -li 'blahblah...' > path-name.list 2>/dev/null
If you want a perl script to do something with that list of files, just set up the script to read the path-name list as input. If you use while(<>) your script can either read from a list file (as produced by my example above), or you could just tack it on at the end of the pipe.