Perl
文章平均质量分 77
iushnauh
这个作者很懒,什么都没留下…
展开
-
Note of Learning Perl--Scalar Data
Scalar Data--------------1. Numbers 1) Perl allows underscores for clarity within integer literals, so we can also write 61298040283768 like this: 61_298_040_283_768 2) Nondecimal Integer Literals...2010-04-28 10:30:37 · 87 阅读 · 0 评论 -
Perl 中的unlink,link,symlink等,处理文件和目录(转)
删除文件 在 perl 中用 unlink 操作符删除文件,同 shell 的 rm 命令一样。 unlink "aa","bb","cc"; 把这三个文件删除。 与 glob 函数结合起来可以一次删除多个文件 unlink glob "*.o"; 删除当前目录下以 .o 结尾的文件,与 rm *.o 相似。 unlink 的返回值告诉我们 有多少文件被成功删除。 my $succ...原创 2010-08-23 16:13:49 · 1310 阅读 · 0 评论 -
Note of Learning Perl--Process Management
Process Management------------------------1. The exec Function Because Perl is no longer in control once the requested command has started, it doesn't make any sense to have any Perl code following ...原创 2010-05-17 14:33:43 · 85 阅读 · 0 评论 -
Note of Learning Perl--Filehandles and File Tests
Filehandles and File Tests-----------------------------1. Closing a Filehandle Perl will automatically close a filehandle if you reopen it (that is, if you reuse the filehandle name in a new open) o...2010-05-17 14:24:17 · 96 阅读 · 0 评论 -
Note of Learning Perl--More Control Structures
More Control Structures----------------------------1. The until Control Structure The util loop runs until the conditional expression returns true. But it's really just a while loop in disguise, exc...原创 2010-05-11 10:26:49 · 91 阅读 · 0 评论 -
Note of Learning Perl--I/O Basics
I/O Basics-------------1. Input from Standard Input 1) The difference is under the hood. In the while loop, Perl reads a line of input, puts it into a variable, and runs the body of the loop. Then, ...原创 2010-05-10 10:59:59 · 106 阅读 · 0 评论 -
Note of Learning Perl--Hashes
Hashes-------------1. Keys and Values 1) Technically, Perl rebuilds the hash table as needed for larger hashes. In fact, the term "hashes" comes from the fact that a hash table is used for implement...原创 2010-05-07 09:12:46 · 101 阅读 · 0 评论 -
Perl的特殊符号
@ 数组 $x{} x名字前面是美元符号($),后面是花括号({}),则其为 hash 元素% 要引用整个 hash,使用百分号(“ )作为前缀。前面几页中使用的 hash 的名字为%family_name。$! 系统产生的一些可读的信息,也可能是出错的信息$_ 子函数参数变量自己本身@_ ...原创 2010-05-06 16:07:19 · 113 阅读 · 0 评论 -
Perl特殊变量(转)
NAME perlvar - Perl 预定义变量DESCRIPTION 预定义名称 后面列出的名称对 Perl 来说具有特殊含义。 大多数标点名称都有合理的助记方法或类似于在 shell 中的用法。 然而,如果你就是想用长变量名,那只要在程序开头加上 use English;...原创 2010-05-06 16:02:42 · 187 阅读 · 0 评论 -
Note of Learning Perl--Subroutines
Subroutines-----------------1. System and User Functions 1) The name of a subroutine is another Perl identifier (letters, digits, and underscores, but can't start with a digit) with a sometimes-opti...2010-05-05 09:52:44 · 77 阅读 · 0 评论 -
Note of Learning Perl--Lists and Arrays
Lists and Arrays------------------1. Lists and Arrays 1) A list is an ordered collection of scalars. An array is a variable that contains a list. In Perl, the two terms are often used as if they're ...2010-04-29 16:25:11 · 104 阅读 · 0 评论 -
Learning Perl 4th Chinese Edition
Learning Perl 4th Chinese Edition2010-04-29 16:18:06 · 90 阅读 · 0 评论 -
OReilly Perl CD Bookshelf V4.0
EBOOK of Perl2010-04-29 09:35:23 · 104 阅读 · 0 评论 -
Perl Hash Usage (Reposted)
perl中没有bool类型perl中没有bool类型,所有的判断都是通过数字类型和字符串类型来进行的。哪些类型为false标量只有三种,数字0,空字符串"", 字符串'0'("0")。矢量有空数组,空哈希。判断数组或哈希为空和标量一样,直接将数组或哈希放到if语句中即可my @list = () ;if(@list){ print "Not empty!\n" ;...原创 2011-10-17 16:00:45 · 237 阅读 · 0 评论