Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Anonymous Monk
on Apr 12, 2010 at 05:36 UTC ( #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? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2023-05-27 23:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?