In perl 5.10, $^MATCH will be equivalent to $& but at the same time the global speed penalties will not come into play. This means $& can be left alone.
The price to pay is that you will need to add the /p modifier flag to the pattern in order to tell perl that you want them. A reasonable trade-off.
• another intruder with the mooring in the heart of the Perl
In reply to Re: Can we make $& better? (no need with $^MATCH)
by grinder
in thread Can we make $& better?
by TedYoung
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |