- 博客(7)
- 收藏
- 关注
原创 perl加载feature的方式
perl不同的版本会有一些新的特性出现,想要使用必须加载.#!/use/bin/perluse strict;use warnings;## #### 用qw加载use feature qw(say);##### 通过指定版本号隐式加载#use v5.10;##### 加载所有该版本的feature#use feature ':5.10';##### 在某个语句
2016-11-30 19:02:58 699
原创 获取以及修改cpan镜像地址
坐标北京,cpan install安装模块慢到无法容忍,只能想办法修改cpan镜像地址获取cpan镜像地址打开cpan搜索网站http://search.cpan.org/
2016-11-29 17:55:39 2475
原创 perl模块 Getopt::Long解析参数
Getopt::Long模块是用于解析命令行参数的perl模块选项解析其他用法使用options调用subroutines多命名选项捆绑选项- 和 GetoptLongConfigure## option variables with default valuemy $verbose = "";my $nda = "";my $more = 0;my $value = "";
2016-11-28 16:05:02 14584
原创 perl切片(数组和哈希)
切片用法可在数组和哈希中提取值数组中取数组my @array = qw(aa bb cc dd);my @select = @array[1,3];print "@select\n";##输出bb dd哈希中取值my %hash = ( "a" => 1, "b" => 2, "c" => 3, "d" => 4,);my @select = @hash{qw
2016-11-25 17:39:27 4056
原创 perl小笔记
perl将普通数值转换为科学计数法数字:用sprintf转化。my $result = sprintf("%.8e", 123456); ## $result => 1.23456000e+005在perl中使用特殊名的变量名形式($@=>$EVAL_ERROR / $&=>$MATCH)use English; ## use Englis
2016-11-22 14:56:07 998
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人