($out_message = $log_format) =~ s/%(.)/ if ($meta_char{$1}) { $meta_char{$1}->() } else { warn("Unrecognized format %$1\n"); "%$1" } /ge;