Do you know where your variables are? | |
PerlMonks |
Re^3: Parsing logs and bookmarking last line parsedby Marshall (Canon) |
on Aug 19, 2010 at 20:03 UTC ( [id://856116]=note: print w/replies, xml ) | Need Help?? |
I missed this comment before posting my reply below. It would help if you could explain what you intend to use this "last processing occurred at XYZ date/time" for? I'm actually not sure that you need this concept at all. If you just need the last data for each backup set, then I would process the input file, replacing old info with new as it becomes available. Then the output becomes "hey here is the most recent stuff I have". All of this processing will be so fast that there is no need to keep track of what you did before, just do it all again to keep things simple. I mean there are 86,400 seconds in a day and running a program once per day that takes one second is nothing in the scheme of things! The problem I came into was that the data for each backup set doesn't appear to be "symmetric". In other words, sometimes some parm values are "missing". This can cause some previous value to continue to be "carried forward" when that is not the right thing to do. Rather than getting into some "spec war", I post a simple minded use of my previously posted code to report "last values" of each set and then you can tell me: "Hey this would have been right if it had of done X". Below I didn't use $date, don't know why you need $date. In doing this short thing, I noticed that $param could have a leading space, so I changed a regex.
In Section
Seekers of Perl Wisdom
|
|