Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: PGA Golf, Round 1

by srawls (Friar)
on May 25, 2001 at 00:38 UTC ( #83125=note: print w/ replies, xml ) Need Help??


in reply to PGA Golf, Round 1

Hole #5 -- 27 chars (now 34, added $t-pop;):

sub MAX {$t=pop; (grep{$t<$_?$t=$_:0}@_)[-1] }

Update:Changed code--it didn't handle negative numbers before. (thanks for the /msg chemboy)



The 15 year old, freshman programmer,
Stephen Rawls


Comment on Re: PGA Golf, Round 1
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2015-07-29 08:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (261 votes), past polls