Syntactic Confectionery Delight | |
PerlMonks |
Re^5: no way it's not a bug of Perlby ikegami (Patriarch) |
on Jul 14, 2024 at 13:17 UTC ( [id://11160600]=note: print w/replies, xml ) | Need Help?? |
s/(?:)// will do nothing (or rather, replace one-zero length string with another zero-length string). So, if you have a possibly-empty pattern in a variable, you could use
or
The latter was buggy before 5.18 as it resulted in the same as s/// when $pat contained an empty string.
In Section
Seekers of Perl Wisdom
|
|