![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Perl
visayafan
这个作者很懒,什么都没留下…
展开
-
perldoc
1 perldoc 选项 perldoc -h #查看可选项 perldoc -f print #查看内置函数信息 perldoc -q support #在perlfaq[1-9]中查找有关查找关键字的帮助信息。 2 perldoc 文档 perldoc perl 查看所有文档信息 perldoc perltoc 以toc(table of content)形式查看所有文档信息 查找到自原创 2011-10-27 21:57:22 · 896 阅读 · 0 评论 -
Perl中注释
单行用# 多行用 =后紧跟说明字符 xxxxxxxxxxxxx =cut原创 2011-10-27 21:58:43 · 871 阅读 · 0 评论 -
【Perl】defined与exists
Perl中defined用来判断一个变量是不是undef,也就是知道有这个变量但不知道它是不是undef;exists用来判断一个hash中的键是否存在。键存在但有可能是undef。 #!/usr/bin/perl -w use strict; my $a; my $b=""; my $c=1; print "a ok\n" if defined $a; print "b ok\n"原创 2011-11-23 22:51:45 · 2658 阅读 · 0 评论 -
【Perl】 system/exec/readpipe区别
system system("command", arg0, arg1 ...) 执行命令返回结束状态 exec The exec function executes a system command and never returns; use system instead of exec if you want it to return. It fail原创 2011-11-24 08:59:27 · 2856 阅读 · 0 评论 -
标题环境的分割返回最后一个值 (Slices in scalar context return the last item of the slice. )
($t) = qw/"a", "b"/; # 个数不匹配,$t匹配"a" $t = qw/"a", "b"/; # 此时$t = 后一个 my @a = qw/first second third/; my %h = (first => 'A', second => 'B'); my $t = @a[0, 1];原创 2011-11-07 21:05:32 · 1038 阅读 · 0 评论