Re: What's in a Regex (was RFC 145)
[email protected] (Tom Christiansen) Thu, 07 Sep 2000 08:16:28 -0600
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Message-ID | <24652.968336188@chthon> |
>But you said "lists" up there and that sparked an idea in me ... What
>does
> @a =~ /pattern/;
>currently do? AFAICT, nothing useful. But it could be a syntactic
>shorcut for a pattern matching grep()
That changes semantics in places you might not expect. What does
fn() =~ /pattern/
currently do? It calls fn() in scalar context, of course.
But with your suggestion, the =~ operator is no longer a scalar
operator, so this changes.
--tom