PERL Practical Extraction and Report Language Perl Larry
- Slides: 51
PERL释义 Practical Extraction and Report Language 实用摘录和报告语言,但它其实不是缩写 Perl的历史 Larry Wall,1987. 12. 18
Perl的环境准备 l Unix:大多数内置 l 一些软件也内置perl,比如 apache/oracle l Windows:Active. Perl 5. 10. 0
Perl的 具 编辑 具:notepad,vi IDE:Komodo,Perl Dev Kit CGI:Top perl studio,Perl builder, perl edit,perlwiz,Mod_perl
控制结构 o o o o if(condition 1){} elsif(condition 2){}else{} unless(){} until(){} do{} until() while(){} do {} while () for(; ; ){} foreach循环语句
文件缓冲 缓冲 打开: open, sysopen 关闭 close 读 <>, readline 写 print 定位 tell, seek 无缓冲 sysopen sysread syswrite sysseek
示例 例1:检验变量名的类型: if ($varname =~ /^$[A-Za-z][_0 -9 a-z. A-Z]*$/) { print ("$varname is a legal scalar variablen"); } elsif ($varname =~ /^@[A-Za-z][_0 -9 a-z. A-Z]*$/) { print ("$varname is a legal array variablen"); } elsif ($varname =~ /^[A-Za-z][_0 -9 a-z. A-Z]*$/) { print ("$varname is a legal file variablen"); } else { print ("I don't understand what $varname is. n"); } 例2:b在单词边界匹配:/bdef/匹配def和defghi等以def打头的单词,但不匹 配abcdef。/defb/匹配def和abcdef等以def结尾的单词,但不匹配defghi, /bdefb/只匹配字符串def。注意:/bdef/可匹配$defghi,因为单词包括字母数 字下划线 , $并不被看作是单词的部分。 例3:B在单词内部匹配:/Bdef/匹配abcdef等,但不匹配def;/defB/匹配 defghi等;/BdefB/匹配cdefg、abcdefghi等,但不匹配def, defghi, abcdef。
扩展模式匹配 5、/pattern(? =string)/肯定的和否定的预见匹配. ? = ? ! 匹配后面为string的模式,相反的,(? !string)匹配后面非string的模式, 如: $string = "25 abc 8"; $string =~ /abc(? =[0 -9])/; $matched = $&; # $&为已匹配的模式,为abc,不是abc 8 例1。$line=“block 1 first block 2 second block 3 third” $line=~/blockd(. *? )(? =blockd|$)/g; print $1; 例2。使用while $line="begin <data 1> begin <data 2> begin <data 3>"; while($line=~/begin(. *? )(? =begin|$)/sg) { push(@blocks, $1); }
- Practical extraction and report language
- Practical extraction and report language
- Elseif perl
- Extraction of caffeine from vivarin tablets lab report
- Practical legal research report example
- Practical legal research report example
- Project progress status
- When preschoolers are given tasks that are simplified
- Can you lend larry and me that literary cavalcade
- Latin american model
- Bobby kissing
- "larry page" and ("land owner" or "conservation")
- Larry bossidy and ram charan
- Rawan plushie
- False necessity trap
- Sperling 1960
- Steam jacketed percolator
- Wedge principle of elevators
- Indications and contraindications of extraction
- An absolute contraindication for extraction of teeth is
- Data extraction cleanup and transformation tools
- Difference between dna and rna extraction
- Chelex dna extraction advantages and disadvantages
- Perl logger
- Regular expressions
- Perl diamond operator
- Perl tk tutorial
- Soap lite
- Obfuscated perl
- Perl not equal operator
- Perl web framework
- Cgi linkage
- Html program
- Perl shell scripting
- Perl bioinformatics
- Nassim zellal
- Perl scalar
- Perl hash tutorial
- Four perfect pebbles chapter 2
- Perl bioinformatics
- Perl yaml example
- Open perl ide
- Perl random number generator
- Perl log analysis
- Slidetodoc.com
- Intro to perl
- Perl getting started
- Chromosomes examples in real life
- Perl linked list
- Perl conditionals
- Perlintro
- Perl paradigma