in reply to Check exist of anonymous subroutine before calling it within regexp substitute?

my $default = sub { '' }; ... ($out_message = $log_format) =~ s/%(.)/($meta_char{$1} || $default)->( +)/ge;

This replaces unknown escape sequences with an empty string.

Perl 6 - links to (nearly) everything that is Perl 6.
  • Comment on Re: Check exist of anonymous subroutine before calling it within regexp substitute?
  • Download Code