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 145 (v2) Brace-matching for Perl Regular Expressions

2000-08-25 Thread Eric Roode
Nat wrote: 5.6's regular expressions have (??{ ... }) to permit recursion and $^R to maintain state through the parsing. In another thread, Tomc wrote: [...] Likewise the @+ and @- stuff. Okay, I'm throwing my ignorance out for the whole world to see. WTF?? Sure, I'm not in the loop, as

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 145 (v2) Brace-matching for Perl Regular Expressions

2000-08-25 Thread Tom Christiansen
All in all, though, you're right that neither set of features is particularly well-known/used outside of p5p followers. At least from what I've seen. Virtually every person I've worked with since 5.6 came out has been surprised and amazed at the REx eval stuff. The completely reworked regex

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

New match and subst replacements for =~ and !~ (was Re: RFC 135 (v2) Require explicit m on matches, even with ?? and // as delimiters.)

2000-08-25 Thread Nathan Wiger
[cc'ed to -regex b/c this is related to RFC 138] Proposed replacements for m// and s///: match /pattern/flags, $string subst /pattern/newpattern/flags, $string The more I look at that, the more I like it. Very consistent with split and join. You can now potentially match on