... or even prettier (but untested):
$xml =~ s{ <tag> \K (\d{11}) (?= </tag>) }{ md5_hex($1) }xmseg;
In reply to Re^2: Regex substitute with both a sub and other data
by AnomalousMonk
in thread Regex substitute with both a sub and other data
by FloydATC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |