Pathologically Eclectic Rubbish Lister | |
PerlMonks |
ēRe^3: Golfing on a quiet Friday afternoon...by vladb (Vicar) |
on Jul 26, 2002 at 22:04 UTC ( [id://185676]=note: print w/replies, xml ) | Need Help?? |
Ahh, certainly this is cheating BrowserUk {grin}.
The version of emulated DOS on your Win32 system always places new command prompt on a separate line by itself. So, even if your perl script prints just '13' without a terminating '\n', DOS would do the job for you. However, for a Unix system I can't see how one could go shorter than just: Which is 14 characters. Surely, had japhy considered writing his golf for DOS, then the ',$/' part would be dropped thereby reducing the golf even further by 3 characters as you've pointed out ;-) Update: To clarify, the word 'cheating' should be considered a sarcasm ;^). I didn't mean to sound offending. I very much respect BrowserUk's comment and have nothing against him pointing out the intimate features of perl running on various non *nix systems. I simply felt it would be worthwhile to also direct your attention to the minor difference in running the golf piece on Win32 and Unix systems. _____________________
In Section
Meditations
|
|