加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

perl滑动匹配核心代码

发布时间:2020-12-16 00:04:40 所属栏目:大数据 来源:网络整理
导读:?if ($ansfline eq ""data"") ??????? { ????????$dataflag=1; ????????next; ????? } ?????if($dataflag==1) ?????{ ?????? ??????#以下代码滑动匹配时间 ??????if($compflag==0) ??????{??if ($ansfline=$result_time1) ????????? { ????????? ? $compfl

?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_changen";
?????? ??? ? $compflag=0;
???????? }
????????
??????????
?????? ??? ?????? ??
?????? }
?????? elsif($compflag==2)
?????? {
?????? ??? if($ansfline=~/"*"/)
?????? ??? {
?????? ??? ?#print "findn";
?????? ??? ?$result_total+=$result_time2-$result_time1;
?????? ??? ?print(frecOut "find $resfline in $resFile is not match in $ansFilen");
?????? ??? }
?????? ??? else
?????? ??? {
?????? ??? ?
?????? ??? ? #seek(ansf,0);
?????? ??? ? seek(ansf,$pre2,0);???? #回退两行
?????? ??? ? $position_change = tell(ansf);
?????? ??? ?
?????? ??? ? #print "position minus 2 is $position_changen";

?????? ??? } ?????? ??? ?????? ??? ?$compflag=0; ?????? ??? ?????? ??? ?????? } ?????? ?????? } ??????? ????? }???

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读