Re: RFC 158 (v1) Regular Expression Special Variables

2000-09-11 Thread Hugo
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

Re: RFC 158 (v1) Regular Expression Special Variables

2000-08-25 Thread Uri Guttman
"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

Re: RFC 158 (v1) Regular Expression Special Variables

2000-08-25 Thread Tom Christiansen
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

Re: RFC 158 (v1) Regular Expression Special Variables

2000-08-25 Thread David L. Nicol
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

Re: RFC 158 (v1) Regular Expression Special Variables

2000-08-25 Thread Mark-Jason Dominus
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