http://www.perlmonks.org?node_id=83125


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