in reply to Smart match & substitution

it is apparently "almost" trivial to smart match against a vast swathe of regex patterns by smart matching an array.

my $regexp = join '|', @patterns; $str =~ /$regexp/

That's cool. But what if I want to sub out as a result ?

$cleanLine =~ s/$_//g for @regexps;