Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Counting matches.

by sh1tn (Priest)
on Dec 07, 2007 at 12:39 UTC ( #655635=note: print w/replies, xml ) Need Help??


in reply to Counting matches.

Use intermediate list context:
print (($counter = () = /a/g) >= 3 ? 'more' : 'less');


Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://655635]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2017-08-23 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (345 votes). Check out past polls.

    Notices?