hi try this
use strict; my $cnt=0; while(<DATA>){ $_ =~s/<xxx>/++$cnt.$&/gie; print $_; } __DATA__ <xxx>...</xxx> <p>...</p> <xxx>...</xxx><xxx>...</xxx> <p>...</p>
Regards
Balaji. M
In reply to Re: find and replace counter
by msbalaji
in thread find and replace counter
by texuser74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |