Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Counting matches.

by sh1tn (Priest)
on Dec 07, 2007 at 12:39 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://655635]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found