in reply to I thought I found a bug of Perl
See the documentation of s///:
If the pattern evaluates to the empty string, the last successfully executed regular expression is used instead. See perlre for further explanation on these.
In your code, s///r has the empty pattern in it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: no way it's not a bug of Perl
by vincentaxhe (Scribe) on Jul 14, 2024 at 10:48 UTC | |
by NERDVANA (Priest) on Jul 14, 2024 at 10:57 UTC | |
by LanX (Saint) on Jul 14, 2024 at 22:55 UTC | |
by choroba (Cardinal) on Jul 14, 2024 at 23:06 UTC | |
by NERDVANA (Priest) on Jul 15, 2024 at 08:26 UTC | |
by vincentaxhe (Scribe) on Jul 14, 2024 at 11:37 UTC | |
by ikegami (Patriarch) on Jul 14, 2024 at 13:17 UTC | |
by vincentaxhe (Scribe) on Jul 14, 2024 at 14:02 UTC |