in reply to yargs -- xargs but handle spaces in filenames

I have never run into a case where somebody thought it was reasonable to include a newline in a filename.

Alas, I have run into a few cases where someone managed to include a newline in a filename without intending to. It happens.

For example, "find ... -print0 | grep ... | sed ... | xargs -0 ..." isn't likely to work properly.

But something like this is likely to work just fine:

find ... -print0 | perl -0 -lne 'if(m{...}){s{..}{..};print}' | xarg +s -0 ...
In fact, I think that's better overall as a general solution for this sort of problem.

(updated snippet to avoid using "/" as a regex delimiter, since "/" would often be used in the regex)