##Perl, 63 chars##
Perl, 63 chars
say for"1234567890JIHGFEDCBAKLMNOPQRST!?,.ZYXWVU"=~/(?=(...))/g
This solution uses the say
function (available since Perl 5.10.0 with the -E
switch, or with use 5.010
). Without it, the best I can do is 67 chars (and an extra newline at the end of the output):
print"1234567890JIHGFEDCBAKLMNOPQRST!?,.ZYXWVU"=~/(?=(...))/g,$,=$/
Earlier 65-char solution:
s//1234567890JIHGFEDCBAKLMNOPQRST!?,.ZYXWVU/;s!(?=(...))!say$1!eg
Replacing say$1
with print$1.$/
lets the code run on older perls, at the cost of 5 extra characters.