Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Finding the max()/min() (stmt modifier form)

by demerphq (Chancellor)
on Nov 11, 2004 at 10:47 UTC ( #406981=note: print w/ replies, xml ) Need Help??


in reply to Re: Finding the max()/min()
in thread Finding the max()/min()

sub max { my $max=shift; $max < $_ and $max = $_ for @vars; return $max; }

Is marginally shorted and probably faster, but commits what some would call the crime of logic based control flow.

---
demerphq


Comment on Re^2: Finding the max()/min() (stmt modifier form)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2014-07-30 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls