in reply to Re^5: Escaping special characters for POD output
in thread Escaping special characters for POD output

ow, the leading look-behind will slow things down a lot.

my %transforms = ( ( map { "$_<" => "$_E<lt>" } 'A'..'Z' ), ">" => "E<gt>", " " => "E<32>", "\t" => "E<9>", "=" => "E<61>", "/" => "E<sol>", "|" => "E<verbar>", ); s{ ( [A-Z]< | [>/|] | ^[ \t=] ) }{$transforms{$1}}g;

Replies are listed 'Best First'.
Re^7: Escaping special characters for POD output
by perlancar (Hermit) on Dec 16, 2019 at 16:15 UTC
    My casual testing confirms slowdown but not that significantly. Can you provide some texts for benchmarking?

      I didn't do any benchmarking.