Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: I think Perl ruined me as a programmer

by Anonymous Monk
on Apr 12, 2010 at 05:36 UTC ( [id://834189]=note: print w/replies, xml ) Need Help??


in reply to Re^3: I think Perl ruined me as a programmer
in thread I think Perl ruined me as a programmer

or, to avoid warnings about the occasional undefs in your arg list:
sub min { my $min; for (@_) { next unless defined; $min = $_ if $_ < $min } $min }

Replies are listed 'Best First'.
Re^5: I think Perl ruined me as a programmer
by Anonymous Monk on Apr 12, 2010 at 05:45 UTC
    oops, sorry..
    sub min { my $r; for (@_) { next unless defined; $r = $_ if !defined($r) || $_ < $r } $r }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-04-23 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found