学习perl的reverse,sort,scalar

学习perl的reverse,sort,scalar,第1张

概述 学习perl的reverse,sort,scalar,记录一下。 [root@OTRS perl]# more reverse_sort_scalar.pl #!/usr/bin/perl -w use strict; #reverse my @array_reverse = 1..3; my @array_ed = reverse(@array_reverse); print "数组的值为1

 学习perl的reverse,sort,scalar,记录一下。

[root@OTRS perl]# more reverse_sort_scalar.pl #!/usr/bin/perl -w use strict; #reverse my @array_reverse = 1..3; my @array_ed = reverse(@array_reverse); print "数组的值为1 2 3,reverse反转数组的值为: ","@array_ed\n"; #sort my @array_sort = qw/c b a/; my @sorted = sort@array_sort; print "数组的值为c b a,sort排序后为: "@sorted\n#scalar强制指定标量上下文。 my @array_scalar = qw/a b c/; print "数组的值为abc,scalar指出数组的个数为:scalar@array_scalar,0); ">"\n"; [root@OTRS perl]# perl reverse_sort_scalar.pl 数组的值为1 2 3,reverse反转数组的值为: 3 2 1 数组的值为c b a,sort排序后为: a b c 数组的值为abc,scalar指出数组的个数为:3

转载自:http://baiqiuyi.com/linux/perl_reverse_sort_scalar.html?replytocom=1985小桥流水人家

@H_864_404@ 总结

以上是内存溢出为你收集整理的学习perl的reverse,sort,scalar全部内容,希望文章能够帮你解决学习perl的reverse,sort,scalar所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1283019.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-09
下一篇2022-06-09

发表评论

登录后才能评论

评论列表(0条)

    保存