<div dir="ltr"><div><br></div>Given this (go for the process flow, not the actual code ) :<div><br></div><div>$Var[0]="Foo";</div><div>$Var[1]="Bar";</div><div>$Var[2]="Baz";</div><div><br></div>
<div>foreach $Loop ( @Var ) {</div><div> &CheckOne if ( $Loop =~ /Test1/ );</div><div> &CheckTwo if ( $Loop =~ /Foo/ );<br></div><div> &CheckThree if ( $Loop =~ /Test3/ );<br></div><div> &CheckFour if ( $Loop =~ /Test4/ );<br>
</div><div> &CheckFive if ( $Loop =~ /Test5/ );<br></div><div> &CheckSix if ( $Loop =~ /Test6/ );<br></div><div>}</div><div><br></div><div>sub CheckTwo {</div><div> # Do some work</div><div>}</div><div><br></div>
<div><br></div><div> There are currently about 15 "Check" sub routines with unique matches (One $Var will no match multiple sub-procs. Is there a way so that if I match on CheckTwo, it will do the equivalent of "next" and go to the next iteration of the loop instead of walking through the rest of the tests?</div>
<div><br></div><div> It doesn't seem like much but I'm parsing almost a gig of data regularly and every check I can skip, the better.</div><div><br></div><div>Robert</div><div><br clear="all"><div><br></div>-- <br>
:wq!<br>
---------------------------------------------------------------------------<br>
Robert L. Harris<br><br>DISCLAIMER:<br> These are MY OPINIONS With Dreams To Be A King,<br> ALONE. I speak for First One Should Be A Man<br> no-one else. - Manowar
</div></div>