in reply to Could someone please explain...

assume you know what | does but just in case, google on unix pipe, and this says take the output of the thing to the left, and give it as input to the cmd on the right.

that settled

find | xargs

google on that. basically, get a list of files, and do some command to it (whatever follows xargs)

find -print0 | xargs -0

is a variant that allows files with spaces or special characters. when in doubt use this of course.

I'll let a perl monk explain the -pi -e and regex.

cheers, t.