in reply to Re^2: Replacing a search/not found pattern with a word
in thread Replacing a search/not found pattern with a word

I can shave a couple of strokes off of that:

perl -lpe'$_=/DOG/?$&:"Not found"'