$ perl -p -i -e 's!oldgirlfriendname!newgirlfriendname!g' `grep -l oldgirlfriend *`