Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: PGA Golf, Round 1

by the_slycer (Chaplain)
on May 24, 2001 at 22:24 UTC ( #83046=note: print w/replies, xml ) Need Help??

in reply to PGA Golf, Round 1

Well, not fully complete - missing 3 and 6, maybe I'll update those later (I have to actually work now). Here are my attempts.
First time golfing :-)

Hole #1 (score 10): sub b{(split)[4]}
Hole #2 (score 21):
perl -e'

goto TPC
Hole #4 (score 47): sub b{$_=reverse;push@_,chr(hex(chop.chop))while$_;@_}
Hole #5 (score 32): sub b{$t=pop;for(@_){$t=$_ if$_>$t}$t}
Update: Thanks tilly, I would never have noticed hole 5 - though I had some bad feelings about it. I don't know WHAT I was thinking for #1 :-)
update2: changed 5 to a working one now :-)

Replies are listed 'Best First'.
Re (tilly) 2: PGA Golf, Round 1
by tilly (Archbishop) on May 24, 2001 at 22:40 UTC
    Hole 1 is wrong. (Words cannot include, for instance, punctuation.)

    Hole 5 is wrong. (You are wrong if $t starts larger than any number in the list. Think of a list of negative numbers.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://83046]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2021-06-24 04:15 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (123 votes). Check out past polls.