Golf

Matts on 2002-05-10T13:03:57

I think I won my first golf tournament.

OK, so I cheated. :-O


Golf Swings

ziggy on 2002-05-10T13:36:29

You could shave some strokes off of that:
print $ARGV[0]**.5    ## Starting solution: 18 strokes

print$ARGV[0]**.5     ## Extraneous whitespace
print shift()**.5     ## D'OH! ()'s needed here
print pop()**.5       ## Single-arg version: 15 strokes
:-) ** 2

Re:Golf Swings

Matts on 2002-05-10T14:33:45

pop() doesn't work with the question given.

Re:Golf Swings

mir on 2002-05-10T14:48:45

die shift()**.5
OK, it gives you some extra info about something happening line 1, but hey, you get the value anyway
(die shift()**.5,$/ is longer)