- 论坛徽章:
- 0
|
以下是我的程式
===================================
open my $info2, "modify_$file" or die "Could not open $file: $!";
open (OUTFILEQAAA, ">result_$file");
for (my $i=0; $i<@uniq_net4; $i++){
while(<$info2>)
{
if((not $already_seen) and m/\(([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\)\s+([^\s]+)\s+m=1\s+w=([^\s\(\)]+)\s+l=([^\s]+)\s+multi=1/){
my $lookfor = $uniq_net4[$i];
if($4 eq $lookfor){
$x_aa = 0.68e-6+$9+($size_net4[$i]-1)*($9+0.38e-6);
$y_pw = $8+2*((1.07e-6+0.3e-6+0.27e-6)*0.9);
$x_pw = ($x_aa+2*(0.6e-6+0.3e-6+0.27e-6))*0.9;
$a_pw = $x_pw*$y_pw;
$p_pw = 2*($x_pw+$y_pw);
$x_dw = ($x_aa+2*(0.6e-6+0.3e-6+0.27e-6+2e-6+1.5e-6))*0.9;
$y_dw = $8+2*((1.07e-6+0.3e-6+0.27e-6+2e-6+1.5e-6)*0.9);
$a_dw = $x_dw*$y_dw;
$p_dw = 2*($x_dw+$y_dw);
print OUTFILEQAAA;
print OUTFILEQAAA "// $uniq_net4[$i] is found in $size_net4[$i] lines \n";
print OUTFILEQAAA "Dpw_$uniq_net4[$i] ( $uniq_net4[$i] iso$i ) pwdnw_iso area=$a_pw pj=$p_pw\n";
print OUTFILEQAAA "Ddnw_$uniq_net4[$i] ( iso$i 0 ) dnwpsub_iso area=$a_dw pj=$p_dw\n\n";
$already_seen = 1;
}
}
else {
print OUTFILEQAAA;
}
}
}
================================================================
我一個@uniq_net4會print出一組data
我現在都只有$uniq_net4[0]成功印出
改如何修改 哪裡搞錯了!
謝謝各位大大 |
|