more useful options | |
PerlMonks |
Re^2: Parsing a Log Fileby PrimeLord (Pilgrim) |
on Nov 29, 2004 at 19:24 UTC ( [id://411012]=note: print w/replies, xml ) | Need Help?? |
I am looking to produce a report that breaks down the statistics for the various players in different situations. For example lets say this snippet was the entire game. I need to know which quarter the events are taking place in which is clearly defined at the top of the file here. I am not concerned about the kick off action so the first line to parse would be:
That line says on 1st and 10 at the Ashveille 13 yard line 48 Hopper ran the ball 1 yard. Now in this game Aheville is the home team so I would essentially want take that information and put it into several "buckets" for the player 48 Hopper. So for example fomr this line we would add information into a "home game bucket" that said he ran once for 1 yard. We would also add that information into a bucket for the first quarter, first half, and 1st down. For simplicity sakes lets say the next line, which was also a run, was run by Hopper. Then I would just add that information into the home game, 1st quarter, and 1st half buckets, but would have to now drop the new information into a 2nd down bucket since it was on second down. Is that making it any clearer? I have to deal with penalties which can negate the previous play. The final report would look something like this.
That is a pretty simplified version of what I am lookig for, but I hope that makes it a bit clearer. -Prime
In Section
Seekers of Perl Wisdom
|
|