摘要:
用Open() 函数打开文件打开文件的常用方法是:open(FH, " $filename")or die "Couldn't open $filename for writing: $!";如果文件不存在,添加模式(用两个大于符号表示)可以用来创建新文件,如果文件存在,该模式并不会清除原来的数据。... 阅读全文
摘要:
Arguments are the values you pass to a Perl script. Each value on the command line after the name of the script will be assigned to the special variab... 阅读全文
摘要:
1.unless/if结构 unless 条件为假的时候 才执行语句块。 eg: unless($fred =~ /^[A-Z_]\w*$/i){ print "The value of \$fred doesn't look like a Perl indentifier name.\n"; } ... 阅读全文
摘要:
1.system function && user function system fucntion:chomp reverse print... user function: &+indetifier2.define a subroutinesubsubroutine_name { body; }... 阅读全文
摘要:
循环控制:1.last 退出标签的语句块2.next3.redo不推荐,循环次数不可控4.goto不推荐。***************************************标签:先定义一个 labellast|next|redo|goto label;last VS next 相当于C... 阅读全文