我用perl打开一个文件处理存在另一个新文件里,现在我要打开该文件夹里的多个文件怎么弄?
open(BASEFILE,"<I:\\DATA\\tent\\4844_KP0600_15_TP1A1_write_array_test_20150412.dat")o...
open(BASEFILE, "<I:\\DATA\\tent\\4844_KP0600_15_TP1A1_write_array_test_20150412.dat")or die"open file fail:$!";
open(BB,">>I:\\DATA\\tent\\4844_KP0600_15_TP1A1_write_array__1.0_IO.dat");
@B=<BASEFILE>;
$B=@B;
print"$B\n";
for($i=0;$i<77;$i++){ #WAFER上die个数
for($j=0;$j<1024;$j++) #一个die所抽的地址数
{
$shuju=shift(@B); #数据一行行的拿出来
@B_array=split/\s+/,$shuju; #按空格分割
$chazhi1=$B_array[12]-$B_array[10]; #IO1
$chazhi2=$B_array[24]-$B_array[22]; #IO2
$chazhi3=$B_array[36]-$B_array[34]; #IO3
$chazhi4=$B_array[48]-$B_array[46]; #IO4
if($chazhi1>1.0){$COUNT1++;}
if($chazhi2>1.0){$COUNT2++;}
if($chazhi3>1.0){$COUNT3++;}
if($chazhi4>1.0){$COUNT4++;}
}
#printf BB "X= %d Y= %d %d count= %6.4f\n",$B_array[1],$B_array[2],$COUNT1,(($COUNT1)/1024)*100;
printf BB "X= %d Y= %d count= %6.4f\n",$B_array[1],$B_array[2], (($COUNT1+$COUNT2+$COUNT3+$COUNT4)/4096)*100;
#print"$B_array[1] $B_array[2]\n";
$COUNT1=0; $COUNT2=0;$COUNT3=0;$COUNT4=0; 展开
open(BB,">>I:\\DATA\\tent\\4844_KP0600_15_TP1A1_write_array__1.0_IO.dat");
@B=<BASEFILE>;
$B=@B;
print"$B\n";
for($i=0;$i<77;$i++){ #WAFER上die个数
for($j=0;$j<1024;$j++) #一个die所抽的地址数
{
$shuju=shift(@B); #数据一行行的拿出来
@B_array=split/\s+/,$shuju; #按空格分割
$chazhi1=$B_array[12]-$B_array[10]; #IO1
$chazhi2=$B_array[24]-$B_array[22]; #IO2
$chazhi3=$B_array[36]-$B_array[34]; #IO3
$chazhi4=$B_array[48]-$B_array[46]; #IO4
if($chazhi1>1.0){$COUNT1++;}
if($chazhi2>1.0){$COUNT2++;}
if($chazhi3>1.0){$COUNT3++;}
if($chazhi4>1.0){$COUNT4++;}
}
#printf BB "X= %d Y= %d %d count= %6.4f\n",$B_array[1],$B_array[2],$COUNT1,(($COUNT1)/1024)*100;
printf BB "X= %d Y= %d count= %6.4f\n",$B_array[1],$B_array[2], (($COUNT1+$COUNT2+$COUNT3+$COUNT4)/4096)*100;
#print"$B_array[1] $B_array[2]\n";
$COUNT1=0; $COUNT2=0;$COUNT3=0;$COUNT4=0; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询