in reply to Recursive insertion of tags
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\
|
|---|