Here's some meta-code that should show the logic of how I'd approach this:
my $in_combat = 0; #open the file for input LINE: while (my $line=readline($input_file)) { if (# line contains start-combat flag) { $in_combat = 1; } next LINE if (!$in_combat); # do stuff with lines *during* combat--beginning and end will be he +re, too! if (#line contains end-combat flag) { $in_combat = 0; } } # close files, etcetc
TIMTOWTDI, of course.
In reply to Re: Split files based on regexp
by druthb
in thread Split files based on regexp
by TonySoprano
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |