2011年1月29日星期六

Re: [PerlChina] 文件句柄打开以后只能用一次吗?

英语不好,文档看不懂。谢谢你

在 2011年1月29日 下午9:16,Robin Lee <robinlee.sysu@gmail.com> 写道:
> seek(FILE, 0, 0);
> 可以将句柄的读取点复位
> 详见 perldoc -f seek
>
> 2011/1/29 方伟 <fang3wei@gmail.com>
>>
>> 我在XP系统上写了一个查字典的小程序:
>> use warnings;
>> open FILE,'E:\dictionary';
>> while(1){chomp($word=<STDIN>);
>> while(<FILE>){print if /$word/;}
>> }
>> close FILE;
>> 上面的程序不能够实现查完一个单词后接着查下一个单词,然后我修改了一下就可以了:
>> use warnings;
>> while(1){open FILE,'E:\dictionary';
>> chomp($word=<STDIN>);
>> while(<FILE>){print if /$word/;}
>> }
>> close FILE;
>> 我感到疑惑的是:难道文件句柄打开以后就只能使用一次吗?
>>
>> --
>> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
>> 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
>> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
>> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>>
>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

Re: [PerlChina] 文件句柄打开以后只能用一次吗?

seek(FILE, 0, 0);
可以将句柄的读取点复位
详见 perldoc -f seek

2011/1/29 方伟 <fang3wei@gmail.com>
我在XP系统上写了一个查字典的小程序:
use warnings;
open FILE,'E:\dictionary';
while(1){chomp($word=<STDIN>);
           while(<FILE>){print if /$word/;}
          }
close FILE;
上面的程序不能够实现查完一个单词后接着查下一个单词,然后我修改了一下就可以了:
use warnings;
while(1){open FILE,'E:\dictionary';
           chomp($word=<STDIN>);
           while(<FILE>){print if /$word/;}
          }
close FILE;
我感到疑惑的是:难道文件句柄打开以后就只能使用一次吗?

--
您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。


--
您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

[PerlChina] 文件句柄打开以后只能用一次吗?

我在XP系统上写了一个查字典的小程序:
use warnings;
open FILE,'E:\dictionary';
while(1){chomp($word=<STDIN>);
while(<FILE>){print if /$word/;}
}
close FILE;
上面的程序不能够实现查完一个单词后接着查下一个单词,然后我修改了一下就可以了:
use warnings;
while(1){open FILE,'E:\dictionary';
chomp($word=<STDIN>);
while(<FILE>){print if /$word/;}
}
close FILE;
我感到疑惑的是:难道文件句柄打开以后就只能使用一次吗?

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

2011年1月28日星期五

Re: [PerlChina] 有用Perl6开发Application的了吗?

perl6的概念提得比.net和jvm都先进,也早很多,可就是没实现,估计也很难实现。。。。这件事就这样黄了

在 2011-1-28,下午3:27,Liu Yubao <yubao.liu@gmail.com> 写道:

> Parrot 的效率 *目前* 很差,跟 JVM、.Net 完全不是一个量级。
>
> 2011/1/27 Beckheng Lam <bi.ken.lam@gmail.com>:
>> 有谁分享一下吗?
>>
>> 另外,Parrot的运行效率相比于JVM和.NET来讲,哪个更优?
>>
>> --
>> Perl乐事 -- http://www.perlersh.org
>> 我的博客 -- http://www.perlersh.org/blog.html
>> 诸法从缘起,如来说是因。
>> 彼法因缘尽,是大沙门说。
>>
>> --
>> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
>> 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
>> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
>> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>>
>>
>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

[PerlChina] 关闭一个文件句柄后,不能重新打开吗

在同一个程序里

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

Re: [PerlChina] 有用Perl6开发Application的了吗?

错把*看成乘号

在 2011年1月28日 下午3:27,Liu Yubao <yubao.liu@gmail.com>写道:
Parrot 的效率 *目前* 很差,跟 JVM、.Net 完全不是一个量级。

2011/1/27 Beckheng Lam <bi.ken.lam@gmail.com>:
> 有谁分享一下吗?
>
> 另外,Parrot的运行效率相比于JVM和.NET来讲,哪个更优?
>
> --
> Perl乐事 -- http://www.perlersh.org
> 我的博客 -- http://www.perlersh.org/blog.html
> 诸法从缘起,如来说是因。
> 彼法因缘尽,是大沙门说。
>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>
>

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。




--
HY_CN

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

2011年1月27日星期四

Re: [PerlChina] 有用Perl6开发Application的了吗?

Parrot 的效率 *目前* 很差,跟 JVM、.Net 完全不是一个量级。

2011/1/27 Beckheng Lam <bi.ken.lam@gmail.com>:
> 有谁分享一下吗?
>
> 另外,Parrot的运行效率相比于JVM和.NET来讲,哪个更优?
>
> --
> Perl乐事 -- http://www.perlersh.org
> 我的博客 -- http://www.perlersh.org/blog.html
> 诸法从缘起,如来说是因。
> 彼法因缘尽,是大沙门说。
>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>
>

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

[PerlChina] HP ilo3的ssh连接是不是有过滤呢

大家好,
 
需求简单的说是向HP server(iLO3)发送一些维护指令,然后接收输入。手动输入没有问题,现在想用程序自动完成。
 
我本想用expect简单实现,不过却发现ssh连接建立后,原本输入的指令发送不过去!(我发送的是show /system1/bootconfig1,结果变成了so)
 
我现在怀疑写perl程序做连接是不是会有同样的问题,不知有没有兄弟有相关经验,能请给点建议。
 
C:\Documents and Settings\jiaqianz\Desktop>expect ssh.expect
spawn ssh -l admin xxx.xxx.xxx.xxx
admin@xxx.xxx.xxx.xxx's password:
User:admin logged-in to ILOCNG029THY4.(xxx.xxx.xxx.xxx)
iLO 3 Advanced 1.05 at  Jun 01 2010
Server Name: server156
Server Power: On
 
</>hpiLO-> so
 
(程序很久不出来,于是我按了ctrl c,下面是debug模式,执行结果相同)

C:\Documents and Settings\jiaqianz\Desktop>
expect -d ssh.expect
expect version 5.26
argv[0] = expect  argv[1] = -d  argv[2] = ssh.expect
set argc 0
set argv0 "ssh.expect"
set argv ""
executing commands from command file ssh.expect
spawn ssh -l admin xxx.xxx.xxx.xxx
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {4016}
 
expect: does "" (spawn_id 4) match glob pattern "password:"? no
admin@xxx.xxx.xxx.xxx's password:
expect: does "
admin@xxx.xxx.xxx.xxx's password: " (spawn_id 4) match glob patter
n "password:"? yes
expect: set expect_out(0,string) "password:"
expect: set expect_out(spawn_id) "4"
expect: set expect_out(buffer) "
admin@xxx.xxx.xxx.xxx's password:"
send: sending "password\r" to { 4 }
 
expect: does " " (spawn_id 4) match glob pattern "hpiLO->"? no
 
User:admin logged-in to ILOCNG029THY4.(xxx.xxx.xxx.xxx)
iLO 3 Advanced 1.05 at  Jun 01 2010
Server Name: server156
Server Power: On
 
</>hpiLO->
expect: does " \nUser:admin logged-in to ILOCNG029THY4.(xxx.xxx.xxx.xxx)\r\niLO
3 Advanced 1.05 at  Jun 01 2010\r\nServer Name: server156\r\nServer Power: On\r\
n\n</>hpiLO-> " (spawn_id 4) match glob pattern "hpiLO->"? yes
expect: set expect_out(0,string) "hpiLO->"
expect: set expect_out(spawn_id) "4"
expect: set expect_out(buffer) " \nUser:admin logged-in to ILOCNG029THY4.(xxx.xx
x.xxx.xxx)\r\niLO 3 Advanced 1.05 at  Jun 01 2010\r\nServer Name: server156\r\nS
erver Power: On\r\n\n</>hpiLO->"
send: sending "show /system1/bootconfig1\r" to { 4 }
 
expect: does " " (spawn_id 4) match glob pattern "hpiLO->"? no
so
expect: does " so" (spawn_id 4) match glob pattern "hpiLO->"? no
(程序死在这里不出来,于是我再次按了ctrl c)
sighandler: handling signal(2)
async event handler: Tcl_Eval(exit)
 
C:\Documents and Settings\jiaqianz\Desktop>type ssh.expect
spawn ssh -l admin xxx.xxx.xxx.xxx
set timeout -1
expect "password:"
sleep 1
send "password\r"
sleep 1
expect "hpiLO->"
sleep 1
send "show /system1/bootconfig1\r"
sleep 1
expect "hpiLO->"
send "exit\r"
 
C:\Documents and Settings\jiaqianz\Desktop>

2011年1月26日星期三

[PerlChina] 有用Perl6开发Application的了吗?

有谁分享一下吗?

另外,Parrot的运行效率相比于JVM和.NET来讲,哪个更优?

--
Perl乐事 -- http://www.perlersh.org
我的博客 -- http://www.perlersh.org/blog.html
诸法从缘起,如来说是因。
彼法因缘尽,是大沙门说。

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

2011年1月25日星期二

Re: [PerlChina] 去除重复序列的问题?

我这有一个想法。。。
你可以把所有的读到一个数组中,每一行是数组的一个元素。
然后,你把这个数组处理一下,去掉数组中重复的元素。
然后,在把这个数组写回去,就行了呗。


2011/1/25 Fei Ni <nifei1998@gmail.com>:
> 本地BLAST之后的结果:
> ce_TREP251 ce_TREP251 100.00 200 0 0 1 200 1
> 200 1e-113 396
> ce_TREP200 ce_TREP200 100.00 200 0 0 1 200 1
> 200 3e-99 349
> ce_TREP1528 ce_TREP1528 100.00 200 0 0 1 200 1
> 200 1e-113 396
> ce_TREP821 ce_TREP1438 93.00 200 13 1 1 200 1
> 199 9e-78 278
> ce_TREP1438 ce_TREP821 93.00 200 13 1 1 199 1
> 200 9e-78 278
> ce_TREP821 cs_TREP3162 85.23 149 22 0 1 149 1
> 149 1e-30 121
> cs_TREP3162 ce_TREP821 85.23 149 22 0 1 149 1
> 149 1e-30 121
>
> 我想去掉其中的两种重复序列(1:1-3行,序列本身的BLAST结果;2:4-5行、6-7行,4和5 | 6和7是一样的结果,只保留一个就可以),
> 第一种很好去掉,但是第二种该如何去掉那(我在尝试着修改我的perl script,但到目前为止一直没有成功。。。)?
> 非常感谢!
> --
> Feiny
> Achieving dream takes time and patience.Great careers don't happen overnight
> ,and take years of hardwork.But every step along the road can get you closer
> to your dream.
>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

2011年1月24日星期一

RE: [PerlChina] 去除重复序列的问题?

没看明白你的问题,可能有一些你的domain知识。能不能解释详细一点,别人才能帮你。

比如你说的重复序列具体特征是什么?是某些列的值相等吗?

Regards! Andy Chen




Date: Tue, 25 Jan 2011 11:24:03 +0800
Subject: Re: [PerlChina] 去除重复序列的问题?
From: nifei1998@gmail.com
To: perlchina@googlegroups.com

多谢指导,不过我没怎么看明白。我是需要把全部行放到一起来做还是逐行匹配阿?

在 2011年1月25日 上午11:14,DXX <master2dou@gmail.com>写道:
写一个正则的匹配表达式,比如现在要修改第2种的,根据4写出一个正则,然后让所有的事件来和这条正则进行匹配,匹配的就去掉,不匹配的留下即可。

2011/1/25 Fei Ni <nifei1998@gmail.com>
本地BLAST之后的结果:
ce_TREP251    ce_TREP251    100.00    200    0    0    1    200    1    200    1e-113     396
ce_TREP200    ce_TREP200    100.00    200    0    0    1    200    1    200    3e-99     349
ce_TREP1528    ce_TREP1528    100.00    200    0    0    1    200    1    200    1e-113     396
ce_TREP821    ce_TREP1438    93.00    200    13    1    1    200    1    199    9e-78     278
ce_TREP1438    ce_TREP821    93.00    200    13    1    1    199    1    200    9e-78     278
ce_TREP821    cs_TREP3162    85.23    149    22    0    1    149    1    149    1e-30     121
cs_TREP3162    ce_TREP821    85.23    149    22    0    1    149    1    149    1e-30     121

我想去掉其中的两种重复序列(1:1-3行,序列本身的BLAST结果;2:4-5行、6-7行,4和5 | 6和7是一样的结果,只保留一个就可以),
第一种很好去掉,但是第二种该如何去掉那(我在尝试着修改我的perl script,但到目前为止一直没有成功。。。)?
非常感谢!
--
Feiny

Achieving dream takes time and patience.Great careers don't happen overnight ,and take years of hardwork.But every step along the road can get you closer to your dream.


--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。



--
nothing is impossible to a willing heart

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。



--
Feiny

Achieving dream takes time and patience.Great careers don't happen overnight ,and take years of hardwork.But every step along the road can get you closer to your dream.


--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

Re: [PerlChina] 去除重复序列的问题?

多谢指导,不过我没怎么看明白。我是需要把全部行放到一起来做还是逐行匹配阿?

在 2011年1月25日 上午11:14,DXX <master2dou@gmail.com>写道:
写一个正则的匹配表达式,比如现在要修改第2种的,根据4写出一个正则,然后让所有的事件来和这条正则进行匹配,匹配的就去掉,不匹配的留下即可。

2011/1/25 Fei Ni <nifei1998@gmail.com>
本地BLAST之后的结果:
ce_TREP251    ce_TREP251    100.00    200    0    0    1    200    1    200    1e-113     396
ce_TREP200    ce_TREP200    100.00    200    0    0    1    200    1    200    3e-99     349
ce_TREP1528    ce_TREP1528    100.00    200    0    0    1    200    1    200    1e-113     396
ce_TREP821    ce_TREP1438    93.00    200    13    1    1    200    1    199    9e-78     278
ce_TREP1438    ce_TREP821    93.00    200    13    1    1    199    1    200    9e-78     278
ce_TREP821    cs_TREP3162    85.23    149    22    0    1    149    1    149    1e-30     121
cs_TREP3162    ce_TREP821    85.23    149    22    0    1    149    1    149    1e-30     121

我想去掉其中的两种重复序列(1:1-3行,序列本身的BLAST结果;2:4-5行、6-7行,4和5 | 6和7是一样的结果,只保留一个就可以),
第一种很好去掉,但是第二种该如何去掉那(我在尝试着修改我的perl script,但到目前为止一直没有成功。。。)?
非常感谢!
--
Feiny

Achieving dream takes time and patience.Great careers don't happen overnight ,and take years of hardwork.But every step along the road can get you closer to your dream.

--
您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。



--
nothing is impossible to a willing heart

--
您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。



--
Feiny

Achieving dream takes time and patience.Great careers don't happen overnight ,and take years of hardwork.But every step along the road can get you closer to your dream.

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

Re: [PerlChina] My test case failed in this way

字符串的比较应该是eq等,或者是只能匹配符,~~

2011/1/24 Andy Chen <ppstay@hotmail.com>
Exactly! I figured it out later. This tell us that we should always turn on the -w options, it actually complains about the '==' operator.

Regards! Andy Chen



> Date: Fri, 21 Jan 2011 07:33:57 +0800
> Subject: Re: [PerlChina] My test case failed in this way
> From: jeova.sanctus.unus@gmail.com
> To: perlchina@googlegroups.com

>
> 你用错了操作符
> 应该用eq,ne
> 转成数字后是nan,然后nan和nan比较都是不等的.所以....
>
> 在 2011年1月21日 上午12:08,Andy Chen <ppstay@hotmail.com> 写道:
> > Run following code, tell me your result.
> >
> > #!/usr/bin/perl
> >
> > my $a= "nAnQpW9mVV0TWLgbLgriCu6Tp2f2ymI7HUZfJS";
> > my $b= "nAnQpW9mVV0TWLgbLgriCu6Tp2f2ymI7HUZfJS";
> >
> > if($a != $b)
> > {
> > print("not equal!\n");
> > }
> > else
> > {
> > print("equal!\n");
> > }
> >
> > if("$a" != "$b")
> > {
> > print("not equal!\n");
> > }
> > else
> > {
> > print("equal!\n");
> > }
> >
> > if(qw/$a/ != qw/$b/)
> > {
> > print("not equal!\n");
> > }
> > else
> > {
> > print("equal!\n");
> > }
> >
> > --
> > 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> > 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
> > 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
> > 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
> >
>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。



--
nothing is impossible to a willing heart

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

Re: [PerlChina] 去除重复序列的问题?

写一个正则的匹配表达式,比如现在要修改第2种的,根据4写出一个正则,然后让所有的事件来和这条正则进行匹配,匹配的就去掉,不匹配的留下即可。

2011/1/25 Fei Ni <nifei1998@gmail.com>
本地BLAST之后的结果:
ce_TREP251    ce_TREP251    100.00    200    0    0    1    200    1    200    1e-113     396
ce_TREP200    ce_TREP200    100.00    200    0    0    1    200    1    200    3e-99     349
ce_TREP1528    ce_TREP1528    100.00    200    0    0    1    200    1    200    1e-113     396
ce_TREP821    ce_TREP1438    93.00    200    13    1    1    200    1    199    9e-78     278
ce_TREP1438    ce_TREP821    93.00    200    13    1    1    199    1    200    9e-78     278
ce_TREP821    cs_TREP3162    85.23    149    22    0    1    149    1    149    1e-30     121
cs_TREP3162    ce_TREP821    85.23    149    22    0    1    149    1    149    1e-30     121

我想去掉其中的两种重复序列(1:1-3行,序列本身的BLAST结果;2:4-5行、6-7行,4和5 | 6和7是一样的结果,只保留一个就可以),
第一种很好去掉,但是第二种该如何去掉那(我在尝试着修改我的perl script,但到目前为止一直没有成功。。。)?
非常感谢!
--
Feiny

Achieving dream takes time and patience.Great careers don't happen overnight ,and take years of hardwork.But every step along the road can get you closer to your dream.

--
您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。



--
nothing is impossible to a willing heart

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

[PerlChina] 去除重复序列的问题?

本地BLAST之后的结果:
ce_TREP251    ce_TREP251    100.00    200    0    0    1    200    1    200    1e-113     396
ce_TREP200    ce_TREP200    100.00    200    0    0    1    200    1    200    3e-99     349
ce_TREP1528    ce_TREP1528    100.00    200    0    0    1    200    1    200    1e-113     396
ce_TREP821    ce_TREP1438    93.00    200    13    1    1    200    1    199    9e-78     278
ce_TREP1438    ce_TREP821    93.00    200    13    1    1    199    1    200    9e-78     278
ce_TREP821    cs_TREP3162    85.23    149    22    0    1    149    1    149    1e-30     121
cs_TREP3162    ce_TREP821    85.23    149    22    0    1    149    1    149    1e-30     121

我想去掉其中的两种重复序列(1:1-3行,序列本身的BLAST结果;2:4-5行、6-7行,4和5 | 6和7是一样的结果,只保留一个就可以),
第一种很好去掉,但是第二种该如何去掉那(我在尝试着修改我的perl script,但到目前为止一直没有成功。。。)?
非常感谢!
--
Feiny

Achieving dream takes time and patience.Great careers don't happen overnight ,and take years of hardwork.But every step along the road can get you closer to your dream.

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

RE: [PerlChina] My test case failed in this way

Exactly! I figured it out later. This tell us that we should always turn on the -w options, it actually complains about the '==' operator.

Regards! Andy Chen



> Date: Fri, 21 Jan 2011 07:33:57 +0800
> Subject: Re: [PerlChina] My test case failed in this way
> From: jeova.sanctus.unus@gmail.com
> To: perlchina@googlegroups.com
>
> 你用错了操作符
> 应该用eq,ne
> 转成数字后是nan,然后nan和nan比较都是不等的.所以....
>
> 在 2011年1月21日 上午12:08,Andy Chen <ppstay@hotmail.com> 写道:
> > Run following code, tell me your result.
> >
> > #!/usr/bin/perl
> >
> > my $a= "nAnQpW9mVV0TWLgbLgriCu6Tp2f2ymI7HUZfJS";
> > my $b= "nAnQpW9mVV0TWLgbLgriCu6Tp2f2ymI7HUZfJS";
> >
> > if($a != $b)
> > {
> > print("not equal!\n");
> > }
> > else
> > {
> > print("equal!\n");
> > }
> >
> > if("$a" != "$b")
> > {
> > print("not equal!\n");
> > }
> > else
> > {
> > print("equal!\n");
> > }
> >
> > if(qw/$a/ != qw/$b/)
> > {
> > print("not equal!\n");
> > }
> > else
> > {
> > print("equal!\n");
> > }
> >
> > --
> > 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> > 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
> > 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
> > 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
> >
>
> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> 要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>

[PerlChina] 有没有人研究openslide

最近想做一个小的上传文档--自动转换为swf [经历转化为pdf,然后pdf2swf],看到openslide项目[该项目主要由perl实现],有无同学研究过这个项目? 我这边老是出现js错误


消息: 'document.getElementsByTagName(...).0.innerHTML' 为空或不是对象
行: 4
字符: 5
代码: 0
URI: http://xxxxx/slidetext.js


目前还没有找到神马原因。求助中...

--
Kind regards
滕召智 (Ben teng)
Cell:   13381221392
MSN:   freet15@hotmail.com
Skype: freet15

--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

2011年1月23日星期日

[PerlChina] Join me on StumbleUpon!

StumbleUpon
Join for free
I've been discovering great stuff on the web with StumbleUpon and I think you'll love it!
Join now so we can see and share each other's favorite web pages. It only takes a minute - check it out!
- qianyang

StumbleUpon is a discovery engine that finds the best of the web, recommended just for you. Learn more

If you do not wish to receive emails sent by StumbleUpon, please click here

© StumbleUpon 2001 - 2011