in reply to Counting matches.
Use intermediate list context:
print (($counter = () = /a/g) >= 3 ? 'more' : 'less');
|
---|
In Section
Seekers of Perl Wisdom