Or if you wanted to keep the -p:perl -nle"print /(DOG)/ ? $1 : 'Not found'"
perl -ple"$_ = /(DOG)/ ? $1 : 'Not found'"
In reply to Re^2: Replacing a search/not found pattern with a word
by ikegami
in thread Replacing a search/not found pattern with a word
by pinpe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |