Mark-Jason Dominus writes:
: There's also long been talk/thought about making $ and $1
: and friends magic aliases into the original string, which would
: save that cost.
:
:Please correct me if I'm mistaken, but I believe that that's the way
:they are implemented now. A regex match populates
"TC" == Tom Christiansen [EMAIL PROTECTED] writes:
$`, $ and $' are useful variables which are never used by any
experienced Perl hacker since they have well known problems with
efficiency.
TC That's hardly true. I could show you plenty of code from
TC inexperienced Perl hackers
those early perl3 scripts by lwall floating around in /etc were poorly
written. i am glad they are finally out of the distribution.
Those weren't the scripts I was thinking about, and it is *NOT*
ipso facto true that something which uses $ or $` is poorly
written.
--tom
Tom Christiansen wrote:
There's also long been talk/thought about making $ and $1
and friends magic aliases into the original string, which would
save that cost.
I was distressed to discover that s///g does not rebuild the
old string between matches, but only at the end. It broke my
random
Please correct me if I'm mistaken, but I believe that that's the way
they are implemented now. A regex match populates the -startp and
-endp parts of the regex structure, and the elements of these items
are byte offsets into the original string.
I haven't looked at it at all, and