larard has asked for the wisdom of the Perl Monks concerning the following question:
doesn't produce an answer that ties with this$ perl -w -e 'use List::Util qw(min); @a = (-10...5); print "@a\n",(min @a),"\n";' -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 0
So why does 'min' in the first example return 0? Just Fixed the code I posted, buggy terminal I was copying from. Sorry.$ perl -w -e 'use List::Util qw(min); @a = (-10...-5); print "@a\n",min(@a);' -10 -9 -8 -7 -6 -5 -10
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: minimum expectation of min?
by dragonchild (Archbishop) on Jul 14, 2004 at 20:03 UTC | |
by larard (Monk) on Jul 14, 2004 at 20:11 UTC | |
|
Re: minimum expectation of min?
by pbeckingham (Parson) on Jul 14, 2004 at 23:20 UTC | |
|
Re: minimum expectation of min?
by dave_the_m (Monsignor) on Jul 14, 2004 at 20:06 UTC |