Perl
飞龙YF
这个作者很懒,什么都没留下…
展开
-
Perl中grep函数的作用
[b][color=red]Perl中grep函数类似Java中contains方法:[/color][/b][code="java"]#!/usr/bin/perlprint("start...\n");if (5) {print("5 is true in if conditon.\n");}print("----------- start to t...原创 2013-04-19 09:57:42 · 203 阅读 · 0 评论 -
perl中localtime,time,gmtime的区别
转:[url]http://www.perlcn.com/perlbc/perljc/515.html[/url]localtime表示系统时间。time表示从1970年开始到现在时间的总秒数。gmtime表示标准格林威治时间。先看三者打出来的结果:1.#!/usr/bin/perl2.my $time=localtime;3.print "localt...原创 2013-04-25 11:50:33 · 290 阅读 · 0 评论 -
perl 小箭头的使用:->
转:[url]http://blog.sina.com.cn/s/blog_9da70e9c010109v7.html[/url]-> 有两种用法,都和解引用有关。第一种用法,就是解引用。根据 -> 后面跟的符号的不同,解不同类型的引用,->[] 表示解数组引用,->{} 表示解散列引用,->() 表示解子程序引用。例子:$arr_ref =...原创 2013-04-25 11:53:18 · 262 阅读 · 0 评论 -
Perl 模块 Getopt::Std 和 Getopt::Long
转自:[url]http://www.cnblogs.com/zjking99/articles/2117258.html[/url]示例程序:getopt.pl;#!/usr/bin/perl -w #use strict; use Getopt::Std; use vars qw($opt_a $opt_b $opt_c); getopts(...原创 2013-04-25 11:54:38 · 188 阅读 · 0 评论