On Fri, Jun 22, 2001 at 04:35:43PM -0400, Brett W. McCoy wrote: > > On Fri, 22 Jun 2001, Paul wrote: > > > $count = () = /$pattern/g; > > However, remember that () is not creating an array, it's creating a list > context, and then it gets forced into a scalar context. Except that's wrong, because a list in scalar context returns the last element of the list, not the count of elements. What's happening in the code snippet is actually a list assignment, but with no elements in the list. A list assignment evaluated in scalar context results in the number of elements in the list. Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com --
- RE: How do I determine number of matches in a regex? Wagner-David
- RE: How do I determine number of matches in a rege... Paul
- RE: How do I determine number of matches in a ... iansmith
- RE: How do I determine number of matches i... Brett W. McCoy
- RE: How do I determine number of match... iansmith
- RE: How do I determine number of ... Brett W. McCoy
- Re: How do I determine number... Michael Fowler
- RE: How do I determine nu... Paul Burkett
- Re: How do I determine number of match... Michael Fowler
- Re: How do I determine number of matches i... Randal L. Schwartz
- Re: How do I determine number of match... iansmith
- Re: How do I determine number of ... Brett W. McCoy
- Re: How do I determine number... iansmith
- Re: How do I determine nu... Randal L. Schwartz