in reply to Counting the number of replaces
In the spirit of TIMTOWTDI:
No, I didn't say it was pretty. ;-)s/<I>/$count++;"<italic>"/eg; print $count || 0;
In Section
Seekers of Perl Wisdom