You could do it in a simple subtitution:
Note the /e modifier to the substitution that permits the evaluation of code in the RHS.$file =<<EOF; <ins cnt="4"> blah <ins cnt="2"> EOF + $file =~ s/<ins cnt="(\d+)">/"<TAG>" x $1/egs; + print $file;
/J\
In reply to Re: Recursive insertion of tags
by gellyfish
in thread Recursive insertion of tags
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |