6 use List::Util qw(maxstr);
10 print "not " unless defined &maxstr;
13 print "not " unless maxstr('a') eq 'a';
16 print "not " unless maxstr('a','b') eq 'b';
19 print "not " unless maxstr('B','A') eq 'B';
22 my @a = map { pack("u", pack("C*",map { int(rand(256))} (0..int(rand(10) + 2)))) } 0 .. 20;
23 my @b = sort { $a cmp $b } @a;
24 print "not " unless maxstr(@a) eq $b[-1];