if ($ansfline eq "\"data\"")
{
$dataflag=1;
next;
}
if($dataflag==1)
{
#以下代码滑动匹配时间
if($compflag==0)
{ if ($ansfline<=$result_time1)
{
$compflag=1;
$pre2=tell(ansf1);
}
}
elsif($compflag==1)
{
if ($ansfline>=$result_time2)
{
$compflag=2;
}
#elsif($ansfline<=$result_time1)
#{
# $compflag=1;
#}
else
{
#$position_minus=$position-$pre;
seek(ansf, $pre, 0); #回退1行
$position_change = tell(ansf);
#print "position minus 1 is $position_change\n";
$compflag=0;
}
}
elsif($compflag==2)
{
if($ansfline=~/"\*"/)
{
#print "find\n";
$result_total+=$result_time2-$result_time1;
print(frecOut "find $resfline in $resFile is not match in $ansFile\n");
}
else
{
#seek(ansf, $pre, 0);
seek(ansf, $pre2, 0); #回退两行
$position_change = tell(ansf);
#print "position minus 2 is $position_change\n";
}
$compflag=0;
}
}
}