[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Re: Golf: chessboard



Rick Klement <rklement@pacbell.net> wrote:

> If extra spaces are allowed in front, then I can make 61 characters:
> 
> #!/usr/bin/perl -l
> $_=pop;s/\d/$"x$&/eg;s/ (?!(..)*$)/./g;y#/#\n#;s/()/ /g;print
> 
> with the aid of the rather weird s/()/ /g to put spaces between
> every character.

Well, s/|/ /g would save yet another stroke, but spaces at the
beginnings of lines make a visible difference in the output,
so it looks like your 62 score still wins for now.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe