what about:
while(<>) { chomp; if(/^FT.*/) { $ft_flag ++; next; } if(/^FH.*/) { $fh_flag ++; next; } if($ft_flag) {...; next;} if($fh_flag) {...; next;} if(/^BH.*/) { $current_bh=$_; next; } if(^0006.*) { do_whatever_using($current_bh,$_); next; } }
In reply to Re: Parse File Containing Multiple Batches With Correlating Detail Records
by alien_life_form
in thread Parse File Containing Multiple Batches With Correlating Detail Records
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |