I think even many old-timers rarely see this bug. You may want to change your expression to something like length( $path ) && ($msg =~ s/$pat/$replace/mg); because the expression 0 is false but non-empty and potentially meaningful to you.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re^4: s/// with an empty pattern uses the previous pattern of a s///
by diotalevi
in thread s/// with an empty pattern uses the previous pattern of a s///
by ckeith100
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |