Re: Matching at least $x words out of @words
Paul Johnson <[email protected]>
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 09, 2005 at 10:27:48AM +0200, Sven Neuhaus wrote: > On Thu, May 05, 2005 at 03:24:22PM +0100, José Castro wrote: > > This is fwp. I would use this perlish solution: > > @a = $x =~ /word1|word2|word3/g; > $count = scalar @a; Without commenting on the solution, the fwp version of this (and possibly the production version too) is surely more like: $count =()= $x =~ /word1|word2|word3/g; -- Paul Johnson - [email protected] http://www.pjcj.net