in reply to (tye)Re3: Finally, a $& compromise!
in thread Finally, a $& compromise!
If I understand what he is doing correctly, he is only playing games with deciding whether or not to capture. If you capture, the decision of whether or not to capture $` and $' is separate.
I would like the pragma to be able to decide not just whether or not to capture, but whether or not to copy the whole string. $`/$' are already distinguished from $& in Perl, and separate control would be nice here.
UPDATE
As just discussed in chatter. Using $& is documented in perlre (as of 5.005 and later) as not being as bad as $` and $'. But in my simple test above, it produced the same slowdown. Which indicates a mistake in the documentation...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 5: Finally, a $& compromise!
by japhy (Canon) on Nov 28, 2001 at 22:31 UTC |