kendroid has asked for the wisdom of the Perl Monks concerning the following question:
My question is similar to this one, but I'm pretty much a newbie so I have a question in addition:
I understand how to throw a file line-by-line into an array, but how could I search the array for "Down" in one element and "Up" in a following (not necessarily the next) element?
I'm trying to generate stats from a router log that looks something like this:
I have to come up with a aggregate downtime from a log like this. I found Time::ParseDate (what a blessing!), so once I know which Down element cooresponds with the next Up, tallying up the downtime shouldn't be a problem. Thanks so much for your help; I'm pretty new to Perl so please be kind. :)a_time_down Down a_time_up Up a_time_down Down a_time_down Down a_time_up Up
Originally posted as a Categorized Question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I parse and evaluate a file line-by-line?
by dfog (Scribe) on Mar 03, 2001 at 11:11 UTC | |
by blazar (Canon) on May 03, 2007 at 10:33 UTC | |
by Anonymous Monk on May 03, 2007 at 01:52 UTC | |
by blazar (Canon) on May 03, 2007 at 10:29 UTC |
Back to
Seekers of Perl Wisdom