in reply to Re: Replacing a search/not found pattern with a word
in thread Replacing a search/not found pattern with a word
Or if you wanted to keep the -p:perl -nle"print /(DOG)/ ? $1 : 'Not found'"
perl -ple"$_ = /(DOG)/ ? $1 : 'Not found'"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Replacing a search/not found pattern with a word
by jwkrahn (Abbot) on Mar 23, 2008 at 06:47 UTC |