Perl Forumtag:easun.org,2008-09-20:/perl//52012-05-03T21:25:53Zpackage EasunLee; use strict; use warnings; $EasunLee::VERSION = '0.05'; Movable Type Pro 4.38【模块使用】aspx页面的html table中数据提取,用什么模块好?tag:easun.org,2012:/perl//5.11912012-02-06T07:45:49Z2012-05-03T21:25:53Z有个杯具的页面,使用aspx写的,其中的html table数据需要用到~~ 所以请教下各位高手,这个使用什么模块好一些,或者方便些? 非常感谢~~...davidlu1001http://easun.org/cgi-bin/mymt/mt-cp.cgi?__mode=view&blog_id=5&id=292
有个杯具的页面,使用aspx写的,其中的html table数据需要用到~~
所以请教下各位高手,这个使用什么模块好一些,或者方便些?
非常感谢~~
issues using matching variable $1,$2,....tag:easun.org,2011:/perl//5.11822011-04-19T15:40:00Z2011-09-09T00:06:21Zmy $v = q/There are 2 boys/; my $regx = '\b(\d+)\b'; my $str = q/$1 of/; # I try to have $1 in a variable and then use the variable in s/// $v =~ s/$regx/$str/g; print $1,"\n"; # print out...kennychenhttp://easun.org/cgi-bin/mymt/mt-cp.cgi?__mode=view&blog_id=5&id=289
3
There are $1 of 10 boys
Then I use "$v =~ s/$regx/$str/gee" instead, it output;
Bareword found where operator expected at (eval 1) line 1, near "$1 of"
(Missing operator before of?)
Number found where operator expected at (eval 1) line 1, near "of 10"
(Do you need to predeclare of?)
3
There are boys
It seems there are no way to let the $1 to be interpolated in this case]]>
bbcode [table] 的 perl 代码tag:easun.org,2011:/perl//5.11762011-01-26T19:09:28Z2011-01-26T19:09:28Z各位好!我刚开始学 perl. 有一个很老的 perl bbs 软件包 leobbs. 里面有这样的代码: [code] $$post =~ s/(\[align=)(left|center|right)(\])(.+?)(\[\/align\])/$4/isg; [/code] 我想加一些行进去,使得 相关的 BBCode 能够工作。 试过 [code] $$post =~ s/\[td\]\s*(.*?)\s*\[\/td\]/$1/isg; ......[/code] 虽然可以用,但不能识别 的很多具体设定。理想地说,我希望 [td※]◇[/tr] 能够转换成 $2 不管 ※ 是空还是非空字符串,都赋值于 $1 ... 当然也要对 [table] , [tr] 做同样的事情。 请教高手我希望的功能的代码。谢谢了。...elimhttp://easun.org/cgi-bin/mymt/mt-cp.cgi?__mode=view&blog_id=5&id=287
各位好!我刚开始学 perl. 有一个很老的 perl bbs 软件包 leobbs. 里面有这样的代码:
[code]
$$post =~ s/(\[align=)(left|center|right)(\])(.+?)(\[\/align\])/$4/isg;
[/code]
我想加一些行进去,使得 相关的 BBCode 能够工作。 试过
[code]
$$post =~ s/\[td\]\s*(.*?)\s*\[\/td\]/$1/isg;
......[/code]
虽然可以用,但不能识别 的很多具体设定。理想地说,我希望
[td※]◇[/tr] 能够转换成 $2
不管 ※ 是空还是非空字符串,都赋值于 $1 ...
当然也要对 [table] , [tr] 做同样的事情。
请教高手我希望的功能的代码。谢谢了。
踩个脚印tag:easun.org,2010:/perl//5.11712010-12-03T16:03:27Z2010-12-08T03:15:51Z邮箱里还能收到烹饪协会的情况反馈 两年半没有在这里了 踩个脚印 咩咩老哥,芳华妹妹 大家可好么?...眼睛oohttp://easun.org/cgi-bin/mymt/mt-cp.cgi?__mode=view&blog_id=5&id=3
邮箱里还能收到烹饪协会的情况反馈