Syntactic Confectionery Delight | |
PerlMonks |
Re: Code Shortening (golf)by eyepopslikeamosquito (Archbishop) |
on Oct 18, 2010 at 20:55 UTC ( [id://866046]=note: print w/replies, xml ) | Need Help?? |
My general golfing advice is to try to use $\ as the accumulator if you possibly can because you can then print it with a bald print. For example, this one is six strokes shorter and gives the same result as yours for the three test cases given at the spoj web site: Don't know if it's generally valid though.
In Section
Seekers of Perl Wisdom
|
|