http://www.perlmonks.org?node_id=440514


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