develooper Front page | | Postings from April 2009

In these times of economic crisis...

Thread Next
Phil Carmody
April 26, 2009 01:19
In these times of economic crisis...
Message ID:

We need dollar-free golf!

In order to answer the question "what ratio of words in the SOWPODS wordlist share no letters in common with the word mackerel?", I quickly threw this together:

perl -ne '$c[m/[mackrel]/]++;}print($c[1]/$.,$/);{' < sowpods 

However, there were complaints that it had too many dollar signs.

What's the shortest equivalent script which uses no dollar signs at all?

()  ASCII ribbon campaign      ()    Hopeless ribbon campaign
/\    against HTML mail        /\  against gratuitous bloodshed

[stolen with permission from Daniel B. Cristofani]


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About