底下的我看不懂了:) from my mobile device. On May 9, 2013 11:20 PM, "Li Xiangchen" <[email protected]> wrote:
> ** > @M输出的结果是对的。 > 在 Fri, 10 May 2013 12:14:54 +0800,Hao Wu <[email protected]> 写道: > > 你只运行前几行看看@M对不对。 > > from my mobile device. > On May 9, 2013 11:13 PM, "Hao Wu" <[email protected]> wrote: > >> 可能是chomp那个地方出了问题。windows的newlines chomp搞不定。 >> >> from my mobile device. >> On May 9, 2013 9:46 PM, "Li Xiangchen" <[email protected]> wrote: >> >>> 下面是我写的程序,本人新手,代码写的乱,还请见谅。遇到的问题是在windows下运行成功,但在linux下却运行没有结果,请帮帮我! >>> >>> use File::Copy ; >>> >>> open(INPUT,"taxID.txt"); >>> >>> $i=0; >>> while (<INPUT>) { >>> chomp($_); >>> chomp($_); >>> $M[$i] = $_; >>> $i++; >>> } >>> $len=@M; >>> >>> for ($i=0;$i<$len;$i++) { >>> >>> open(INPUT1,"417species_PPI.txt"); >>> open(OUTPUT1,">species_PPI.txt"); >>> >>> my $species = $M[$i]; >>> >>> mkdir($species,0755)||die "can't create directory: $!" ; >>> >>> print "Now it is ",$species," it is the ",$i," of these >>> species,remains ",$len-$i," species.\n"; >>> >>> while(<INPUT1>) { >>> if ($_=~/^($M[$i])\.(.*)/){ >>> print OUTPUT1 $_; >>> } >>> } >>> close(INPUT1); >>> close(OUTPUT1); >>> >>> open(INPUT2,"species_PPI.txt"); >>> open(OUTPUT2,">species_PPI2.txt"); >>> >>> while(<INPUT2>) { >>> chomp($_); >>> my@a=split/\s/; >>> print OUTPUT2 "$a[0]\t$a[1]\n"; >>> } >>> close INPUT2; >>> close OUTPUT2; >>> >>> $system_check=system("python jisuan.py"); >>> >>> open INPUT3,"degree_centrality.txt"; >>> open INPUT4,"closeness_centrality.txt"; >>> open INPUT5,"betweenness_centrality.txt"; >>> open INPUT6,"clustering_coefficient.txt"; >>> open OUTPUT3,">degreenew_centrality.txt"; >>> open OUTPUT4,">closenessnew_centrality.txt"; >>> open OUTPUT5,">betweennessnew_centrality.txt"; >>> open OUTPUT6,">clusteringnew_coefficient.txt"; >>> >>> while (<INPUT3>) { >>> s/{(.*)}/$1/g; >>> s/\s//g; >>> s/,/\n/g; >>> s/'(.*)'\:(\d+)/$1\t$2/g; >>> print OUTPUT3 $_,"\n"; >>> } >>> close INPUT3; >>> close OUTPUT3; >>> while (<INPUT4>) { >>> s/{(.*)}/$1/g; >>> s/\s//g; >>> s/,/\n/g; >>> s/'(.*)'\:(\d+)/$2/g; >>> print OUTPUT4 $_,"\n"; >>> } >>> close INPUT4; >>> close OUTPUT4; >>> while (<INPUT5>) { >>> s/{(.*)}/$1/g; >>> s/\s//g; >>> s/,/\n/g; >>> s/'(.*)'\:(\d+)/$2/g; >>> print OUTPUT5 $_,"\n"; >>> } >>> close INPUT5; >>> close OUTPUT5; >>> while (<INPUT6>) { >>> s/{(.*)}/$1/g; >>> s/\s//g; >>> s/,/\n/g; >>> s/'(.*)'\:(\d+)/$2/g; >>> print OUTPUT6 $_,"\n"; >>> } >>> close INPUT6; >>> close OUTPUT6; >>> >>> move("degreenew_centrality.txt","$species")||warn "could not >>> copy files :$!" ; >>> move("closenessnew_centrality.txt","$species")||warn "could not >>> copy files :$!" ; >>> move("betweennessnew_centrality.txt","$species")||warn "could >>> not copy files :$!" ; >>> move("clusteringnew_coefficient.txt","$species")||warn "could >>> not copy files :$!" ; >>> >>> } >>> close INPUT; >>> >>> -- >>> 使用Opera的电子邮件客户端:http://www.opera.com/mail/ >>> >>> -- >>> 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 >>> 要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 [email protected]。 >>> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 >>> 通过以下网址访问此论坛:http://groups.google.com/group/perlchina?hl=zh-CN。 >>> 要查看更多选项,请访问 https://groups.google.com/groups/opt_out。 >>> >>> >>> -- > 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 > 要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 [email protected]。 > 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 > 通过以下网址访问此论坛:http://groups.google.com/group/perlchina?hl=zh-CN。 > 要查看更多选项,请访问 https://groups.google.com/groups/opt_out。 > > > > > > > -- > 使用Opera的电子邮件客户端:http://www.opera.com/mail/ > > -- > 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 > 要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 [email protected]。 > 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 > 通过以下网址访问此论坛:http://groups.google.com/group/perlchina?hl=zh-CN。 > 要查看更多选项,请访问 https://groups.google.com/groups/opt_out。 > > > -- 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 [email protected]。 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 通过以下网址访问此论坛:http://groups.google.com/group/perlchina?hl=zh-CN。 要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
