Re: RFC 110 (v3) counting matches

[email protected] (Bart Lateur)
Newsgroups perl.perl6.language.regex
Organization MediaMind
Message-ID <[email protected]>
On Tue, 29 Aug 2000 11:13:47 -0600, Tom Christiansen wrote:

>We already *HAVE* a token set that forces list context, thank you 
>very much.  It's called "()=".  I'm glad you like it.

	$_ = 'a!a!a!a!a!a';
	$count = () = split /!/;
	print $count;
-->
	1

'()=' is not perfect. It is also butt ugly. It is a "dirty hack".

p.s. Has anybody already suggested that we ought to have a nicer
solution to execute perl code inside a string, replacing "${\(...)}" and
"@{[...]}", which also won't ever win a beauty contest?  Oops, wrong
mailing list.

-- 
	Bart.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.