perlモジュール

2559 ワード

!/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);