Hello there.
I am reading one big text file. It contains several lines specifing events. I will use the actual values. Its a combat log from a game I am parsing.
Here is what I want to do, read the whole file, and find the bits where the combat starts, this is working, I match agains /EnterCombat/.
foreach my $line (@AR_WHOLE_FILE) {
if ( $line =~ /EnterCombat/ ) {
( $timestamp ) = split ($line);
print $timestamp . "\n";
}
}
I want to keep parsing the data after the match, untill I find ExitCombat. I want to find all the targets in between EnterCombat and ExitCombat. This is so I can find the 'boss' fights in the game.
I need some hints on how to approach this, I dont know how to continue to parse when I am already parsing by line, so how do I advance while I am already in a foreach loop..