No such thing as a small change | |
PerlMonks |
Re^4: s/// with an empty pattern uses the previous pattern of a s///by diotalevi (Canon) |
on May 17, 2007 at 17:50 UTC ( [id://616064]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|