Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-28 Thread Jonathan Scott Duff
t radical anymore. This is similar to RFC > 138, only C<$old> is not modified. I wonder what happens when people start typing $new = subst s/old/new/i, $old; -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: RFC 164 (v1) Replace =~, !~, m//, and s/// with match() and subst()

2000-08-28 Thread Jonathan Scott Duff
On Mon, Aug 28, 2000 at 08:12:22AM -0700, Nathan Wiger wrote: > Jonathan Scott Duff wrote: > > > > I think that C is too syntactically close yet semantically far > > from C that the evil demons of confusion will rear their ugly > > heads. > > I agree too, any

Re: RFC 110 (v3) counting matches

2000-08-28 Thread Jonathan Scott Duff
es its meaning. > > The Alternative By Uri : > > m//t and m//g are mutually exclusive and m//gt should be regarded as an error. What does m//c do now? It doesn't seem to make much sense without /g. I wonder why the no-reset global option wasn't called /G instead of /gc Someone

Re: RFC 110 (v3) counting matches

2000-08-29 Thread Jonathan Scott Duff
d\d)/g; $re->onmatch_callback(push @list, makedate(^0,^1,^2)); $string =~ $re; -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: RFC 110 (v3) counting matches

2000-08-29 Thread Jonathan Scott Duff
(this would solve the "counting matches" problem too). $string =~ m{ (\d\d) - (\d\d) - (\d\d) (?{ push @dates, makedate($1,$2,$3) }) }gxl; $count = $string =~ m/foo/gl; # always list context -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: RFC 110 (v3) counting matches

2000-08-29 Thread Jonathan Scott Duff
ot;list" keyword is also bad. What about other contexts? Are we going to have "scalar", "list", "hash", "boolean", "string", "number", etc.? Not to mention (even though I am) user-defined contexts (my Dog $spot; $spot = gen_dog(); <-- that's a "Dog" context). -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: RFC 165 (v1) Allow Varibles in tr///

2000-08-30 Thread Jonathan Scott Duff
terating the entire character set. The same goes for UTF{whatever}. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: RFC 110 (v3) counting matches

2000-09-05 Thread Jonathan Scott Duff
1,$2,$3)}) | (?{sub3($1,$2,$3)}) ) /x; ? If so, all we're missing is @\ > @\ seemed a good mnemonic for "the array of backreferences I already > matched". Yes, it does. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: RFC 145 (alternate approach)

2000-09-05 Thread Jonathan Scott Duff
ogeny not withstanding) ? I mean, we can already do it in the language, why do we want a shortcut? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: XML/HTML-specific ?< and ?> operators? (was Re: RFC 145 (alternate approach))

2000-09-06 Thread Jonathan Scott Duff
? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: What's in a Regex (was RFC 145)

2000-09-07 Thread Jonathan Scott Duff
tops on first match and @a = @b =~ /pattern/g; # equivalent to ... @a = grep { /pattern/; } @b; Also, it'd be nice if @a =~ s/foo/bar/g; did something similar. Comments? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: XML/HTML-specific ?< and ?> operators? (was Re: RFC 145 (alternate approach))

2000-09-07 Thread Jonathan Scott Duff
t; Where qz is some hypothetical new quoting syntax How about qy() for Quote Yacc :-) This stuff is starting to look more and more like we're trying to fold lex and yacc into perl. We already have lex through (?{code}) in REs, but we have to hand-write our own yacc-a-likes. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: is \1 vs $1 a necessary distinction?

2000-09-27 Thread Jonathan Scott Duff
f s///, I'd vote for that being The Way. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: RFC 331 (v1) Consolidate the $1 and C<\1> notations

2000-09-28 Thread Jonathan Scott Duff
ed $1 from the previous RE, then they should have saved it somewhere. This would eliminate the "major" RE-engine changes to make $P1 work. But it would require that the p52p6 translator make some really smart modifications. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Perl 5's "non-greedy" matching can be TOO greedy!

2000-12-15 Thread Jonathan Scott Duff
for? Do you want the default behavior of the RE engine to change and if so, how would we get the current behavior? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]