in reply to
New golf game (for the extremely bored)
Two solutions of 38 characters:
# 1 2 3
perl -le'print+(H,T)[rand 2]for a..gr'
perl -le'print 1<rand 2?H:T for a..gr'
perl -le'print+rand>.5?H:T for a..gr'
Same as 1..200, really ;)
Basically you just use letters instead of numbers.
a..z yields the 26 characters of the alphabet,
a..az yields those and another 26 prefixed with a
a..bz yields those and another 26 prefixed with b
and so on. Same system, more "numbers" ...
Incidentally a..gr yields 7*26 + 18 "numbers".
shiny regexes and rules offered by Perl 6
other CPAN module
by looking at it on my monitor
I print it and I read it in spare time
first I convert it into $FORMAT, then I parse it
I hire someone to do it
using my custom module
I write a brand new language to do the task
on the server where I play as human, XML is forbidden
what is XML?
I speak XML natively
I write a new grammar for Perl 6
some other way
Results (165 votes),