sort @a;最小:$a[0];最大: $a[scalar @a];
@a=qw(1 3 2 8 7 5 4 10 9);@a=sort {$a<=>$b}@a;print "the max number=$a[0]\nthe min number=$a[$#a]\n";
sort一下就出来了