perl -pi -w -e ‘s/search/replace/g;’ *.php
-i means edit in-place
-w write warnings
-e means execute the following line of code.
I want to replace every instance of #FFF in multiple style sheets with #000:
$ perl -pi -w -e 's/\#FFF/\#000/g;' *.css