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]
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
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
d\d)/g;
$re->onmatch_callback(push @list, makedate(^0,^1,^2));
$string =~ $re;
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
(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]
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]
terating the entire character set. The same goes for
UTF{whatever}.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
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]
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]
?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
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]
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]
f s///, I'd vote for
that being The Way.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
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]
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]
15 matches
Mail list logo