Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by demerphq (Chancellor)
on Nov 11, 2004 at 10:47 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://406981]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-26 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found