List::Util, max(), min(), sum(), maxstr(), minstr()...

来源:互联网 发布:淘宝培训有用吗 编辑:程序博客网 时间:2024/05/22 13:16

列表实用工具集。

#!/usr/bin/perl use List::Util qw/max min sum maxstr minstr shuffle/; @s = ('hello', 'ok', 'china', 'unix'); print max 1..10;     #10print min 1..10;     #1print sum 1..10;     #55print maxstr @s;     #unixprint minstr @s;     #chinaprint shuffle 1..10;   #radom order  


0 0