my $default = sub { '' }; ... ($out_message = $log_format) =~ s/%(.)/($meta_char{$1} || $default)->( +)/ge;
This replaces unknown escape sequences with an empty string.
In reply to Re: Check exist of anonymous subroutine before calling it within regexp substitute?
by moritz
in thread Check exist of anonymous subroutine before calling it within regexp substitute?
by jffry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |