Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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');



Comment on Re: Counting matches.
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://655635]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2015-07-03 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls