I have a module that does multiple regex substitutions in parallel safely, like this:
$str = subst($str,
qr/([0-9]*[1-9])/ => '${1}0',
qr/([0-9]+)0/ => '$1',
)
(Adding zeroes to numbers that don't have them, and taking them off
numbers that do).
I now call it Regexp::Subst::Parallel. Would there be a better name
for this module?
Also, would there be a better interface? Should it be object
oriented?
Thanks,
Luke
