看板 Perl 關於我們 聯絡資訊
: 以下是我的寫法 : my $set1 = shift; #a.txt : open FH1,$set1 or die; : while (<FH1>){ : chomp; : /^#/ and next; : @_ = split /\t/; : $test{$_[0]} = { contain => $_[1], total => $_[2], pvalue => $_[3] }; : } : for ( values %test) { : print "$_->{pvalue}\n"; : } for ( sort{ $test{$a}{pvalue} <=> $test{$b}{pvalue} }(keys(%test) ){ print "$test{$_}->{pvalue}\n"; } # 假設你是對pvalue排列 如果不是就對for迴圈裡取的hash做修改 -- 如果青春注定要向前跑 他媽的...那我的出口在那? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.0.109