Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://406981]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (15)
As of 2016-12-05 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (89 votes). Check out past polls.