in reply to Re: Golfing on a quiet Friday afternoon...
in thread Golfing on a quiet Friday afternoon...
I'm very new to golf and don't know the ground rules and was amazed by hans_moleman's solution and simply blown away by japhy's evolution, but.... (/me hear's the groans)...trying japhy's final answer on my win32 (that has -w permenantly enabled) system I got:
C:\test>185653 185653.pl 16Use of uninitialized value in print at C:\test\185653.pl line 1. C:\test>
Ignoring the warning which I could turn off, I noticed that it reports its own length (under win32 etc. etc) as 16!
So, I played and came up with this, which (on my Wi...) does a little better and (visually at least :) complies with the 'rules'
(I see a newline after the number :),
and beats japhy's by 3!...and runs with -w and no errors!
C:\test>185649 185649.pl 13 C:\test>
And the code
C:\test>type 185649.pl print-s pop C:\test>
As an aside, in a unicode world, maybe the requirements should have been "number of bytes"?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
ºRe^3: Golfing on a quiet Friday afternoon...
by vladb (Vicar) on Jul 26, 2002 at 22:04 UTC | |
by BrowserUk (Patriarch) on Jul 26, 2002 at 23:20 UTC | |
by sauoq (Abbot) on Jul 27, 2002 at 00:14 UTC |