4 require Config; import Config;
5 if ($Config{extensions} !~ /\bList\/Util\b/) {
6 print "1..0 # Skip: List::Util was not built\n";
11 use List::Util qw(min);
15 print "not " unless defined &min;
18 print "not " unless min(9) == 9;
21 print "not " unless min(1,2) == 1;
24 print "not " unless min(2,1) == 1;
27 my @a = map { rand() } 1 .. 20;
28 my @b = sort { $a <=> $b } @a;
29 print "not " unless min(@a) == $b[0];