in reply to Re^2: 5.42: Does m// toss a string around?
in thread 5.42: Does m// toss a string around?
I think the PV method constructs new string rather than returns numeric value
No.
SvPVX creates an object that provide information about a scalar ($_[0] aka $s), then uses that object's PV method to obtain the address of the string buffer of $s.
I now suspect similar reasons, related to COW, can you explain please?
COW was introduced in 5.20. Before 5.20, hacks which malfunctioned and/or a more expensive alternative had to be used.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: 5.42: Does m// toss a string around?
by Anonymous Monk on Jan 29, 2026 at 23:30 UTC | |
by ikegami (Patriarch) on Jan 30, 2026 at 18:59 UTC | |
by Anonymous Monk on Jan 30, 2026 at 22:37 UTC | |
by Anonymous Monk on Jan 30, 2026 at 22:47 UTC |