![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
perl
felix_vip
这个作者很懒,什么都没留下…
展开
-
perl点点滴滴
1 全局匹配中怎么得到全部的匹配项 正则表达式在全局匹配时可以用while来逐个获取匹配到的记录,也可以用数组来接收。 my $str = "hello 1111 how are 232 you 2323"; while( $str =~ /(%d)/g) { print $1; } 或者存到数组中 my $array = ($str =~ /(%d)/g);原创 2011-12-08 15:57:05 · 461 阅读 · 0 评论 -
Perl的特殊符号
Perl的特殊符号 @ 数组 $x{} x名字前面是美元符号($),后面是花括号({}),则其为 hash 元素 % 要引用整个 hash,使用百分号(“ )作为前缀。前面几页中使用的 hash 的名字为%family_name。 $! 系统产生的一些可读的信息,也可能是出错的信息转载 2011-12-08 16:04:18 · 1250 阅读 · 0 评论