perl 模块

!/usr/bin/perl 



use List::Util 



####找最大、最小、求和等值



qw/max min sum maxstr minstr shuffle/; 



@a = ('hello', 'ok', 'china', 'unix'); 



print max 1..10; #10 



print min 1..10; #1 



print sum 1..10; #55 



print maxstr @a; #unix 



print minstr @a; #china 



print shuffle 1..10; #radom order

use List::Util qw(first max maxstr min minstr reduce shuffle sum);

 

你可能感兴趣的:(perl)