Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

This one goes for the archives

by rg0now (Chaplain)
on Mar 17, 2005 at 19:51 UTC ( #440514=note: print w/replies, xml ) Need Help??


in reply to Replaying Santa Claus Golf Apocalypse with Pugs/Perl6

After many bugfixes that went to Pugs as the side-effect of this very nice contest, here is the final (now, really) version of my strike at the Santa Claus Golf Apocalypse with Pugs/Perl6 that is assumed to work with current Pugs:
--- head.p6 --------------------------------------------- print*(=<>)[0..9] --- tail.p6 --------------------------------------------- my@l= =<>; print@l[(@l>9??@l-10::0)...] --- rev.p6 --------------------------------------------- print reverse=<> --- mid.p6 --------------------------------------------- my@l= =<>; print@l[int((@l-1)/2)..int(@l/2)] --- wc.p6 --------------------------------------------- say*(split"",int(7e10+ +*(=<>)))[1..11]
This is only 153 strokes, but I am entirely convinced that you can do it by less work... Go figure!

rg0now

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2017-09-19 22:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (229 votes). Check out past polls.

    Notices?