in reply to Re^2: ugly code
in thread ugly code
my $rxPattern; { local $" = q{|}; $rxPattern = qr{(?x) (@{ [ map { quotemeta } keys %map ] }) }; } $string =~ s{$rxPattern}{$map{$1}}g;
I'd be interested to know if this is a sensible approach.
Cheers,
JohnGG
|
|---|