while( <$inputfh> ) { $replcount += s/replacethis/withthis/g; print $outputfh $_; }
-M
Free your mind
In reply to Re: Counting the number of replaces
by Moron
in thread Counting the number of replaces
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |