Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: Homework Golf (35)

by eyepopslikeamosquito (Canon)
on Dec 09, 2013 at 19:14 UTC ( #1066323=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Homework Golf (35)
in thread Homework Golf

Congrats for making me go look up x= ("Get outta here, that's legal? So it is!")
For Perl historians, note that the "$_ x= boolean expression" idiom is attributed to Larry Wall in the early 1990s. IIRC, this attribution was made by japhy around the time of the first fwp golf games in 2001, for example it is mentioned in this post and elsewhere.

Also of interest for Perl golf historians is that, as indicated in mtve's golf history book (page 36), Eugene van der Pijll won the second ever fwp golf game, "Get Even", in 2002, by employing Larry's concoction:

-p $_ x=1&~$.&split$&while aeiouy=~/.?/g
to solve a similar problem to this game, namely printing all words in a dictionary that satisfy the following constraints: i) are on an even line in the words file; ii) have an even word length; iii) contain an even number of each and every vowel.

BTW, this game produced some very funny looking solutions, such as this one by Sean McAfee (which, if you squint, you will notice uses Abigail's length horror):

-ln 1&($.|y|||c|y|a|||y|e|||y|i|||y|o|||y|u|||y|y||)||print


Comment on Re^5: Homework Golf (35)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-10-25 23:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (149 votes), past polls