The regex engine currently always makes a CoW copy (ie doesn't copy the string itself) of the matched string.
There's no CoW substrings - perl's PVs are stored with a trailing NUL so they're useful as a C-style string, and perl itself and XS code depends on that, so I don't think it can be implemented in any case.
In reply to Re^5: RE on lines read from in-memory scalar is very slow
by tonyc
in thread RE on lines read from in-memory scalar is very slow
by Danny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |