<div dir="ltr"><br><div>Anyone have a straight forward script using dispatch lists?  I have one ( 4500 lines by now ) which effectively does this:</div><div><br></div><div><ol><li>Open input file</li><li>while<input> {</li><li>    $Line=<INPUT></li><li>    &Sub1("Line") if ( $Line =~ /<regex pattern 1>/ );</li><li>    &Sub2("Line") if ( $Line =~ /<regex pattern 2>/ );</li><li>    &Sub3("Line") if ( $Line =~ /<regex pattern 3>/ );</li><li>    ... about 25 patterns now ...</li><li>}</li></ol><div>Yeah, it's ugly, it started out as a 30 line data munger about 2.5 years ago and I'm looking to speed and clean it up.   Each Sub performs various actions based which can't be simplified or condensed more than they have.  </div></div><div><br></div><div>   I've created my DispatchHash for subs/patterns but I think I'm confusing myself on actually doing the match and dispatch including passing $Line to the sub.</div><div><br></div><div>Any examples would be very welcome.</div><div><br></div><div>Robert</div></div>