in reply to Extracting Log File data for a given date range

I'd covert the two dates that you get from the command line into numbers (for example days since 1900-01-01 or so), and do the same for each date that you parse. Then you need to only do two comparisons per line.

I personally like Date::Simple for such tasks (the ones that only involves dates, not times, and it seems you can ignore times here).

  • Comment on Re: Extracting Log File data for a given date range

Replies are listed 'Best First'.
Re^2: Extracting Log File data for a given date range
by vishi (Beadle) on Dec 13, 2011 at 13:30 UTC
    But I need to get the dates in the first place - any Idea how I can get that in an array? Oh, yes - I will be ignoring the time for this - My requirement is only dates, so I will be pattern matching for the dates only.