perl List::Maker(生成重复元素的数组);List::Util(最值及其他)

包的下载安装

https://metacpan.org/

PPM(Perl Package Manage)all搜,点,右箭头

《perl List::Maker(生成重复元素的数组);List::Util(最值及其他)》

use List::Maker;

@list=<1..10 x 2>;###1,3,5,7,9

@list=<3 xx 2>;###(3,3)

《perl List::Maker(生成重复元素的数组);List::Util(最值及其他)》

use List::Util;

qw()是用来指定了很多小单引号的句字是一个快速的方法。例如,qw(foo bar baz) 相当于 (‘foo’, ‘bar’, ‘baz’)。一些程序员认为,使用qw使Perl脚本更容易阅读。实际上,你可以使用任何分隔符,而不仅仅是括号组。

简单地,可以使用qw()准备一个数组.

列表元素的列表组成的计算,如果他们是单引号。

《perl List::Maker(生成重复元素的数组);List::Util(最值及其他)》 \

useList::Utilqw(

reduce any all none notall first

max maxstr min minstr product sum sum0

pairs unpairs pairkeys pairvalues pairfirst pairgrep pairmap

shuffle uniq uniqnum uniqstr

);

以下转载自JSON_NULL 

《perl List::Maker(生成重复元素的数组);List::Util(最值及其他)》 常用的最值及其他

    原文作者:白云梦_7
    原文地址: https://www.jianshu.com/p/7d5c8c0e8802
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞