in reply to Brace in the replacement part of a regular expression substitution
$ perle 'my %ent = qw{& & < < > >}; say "... < & > ..." =~ s/([&><])/$ent{$1}/gr'
... < & > ...
luc.bouge: Also see haukex's article for a very useful technique to dynamically prepare a search (sub-)regex from a "translation" hash like %ent.
Give a man a fish: <%-{-{-{-<
|
|---|