in reply to
Counting matches.
Use intermediate list context:
print (($counter = () = /a/g) >= 3 ? 'more' : 'less');
[download]
Comment on
Re: Counting matches.
Download
Code
In Section
Seekers of Perl Wisdom