<?xml version="1.0" encoding="windows-1252"?>
<node id="943458" title="Re: Extracting Log File data for a given date range" created="2011-12-13 20:19:03" updated="2011-12-13 20:19:03">
<type id="11">
note</type>
<author id="421781">
Cristoforo</author>
<data>
<field name="doctext">
A solution using [mod://Date::Parse].
&lt;c&gt;#!/usr/bin/perl
use strict;
use warnings;
use Date::Parse qw/ str2time /;

#my ($start, $end) = map str2time($_), qw/ 01-Dec-2011 11-Dec-2011 /;
my ($start, $end) = map str2time($_), @ARGV;

while (&lt;DATA&gt;) {
    (my $date = (split /,/)[3]) =~ s/_.+//;
    my $time = str2time( $date );
    print if $start &lt;= $time &amp;&amp; $time &lt;= $end;
}


__DATA__
ABC01, 91XYZ889=_=SOMEBODY.NAME@DOMAIN.COM, HighPriority, 02-Dec-2011_00.34.51, bigFatLog_02-Dec-2011_00.34.06.log
ABC03, 93XYZ272=_=SOMEBODY.NAME@DOMAIN.COM, HighPriority, 07-Dec-2011_09.21.58, bigFatLog_07-Dec-2011_09.20.57.log
ABC02, 93XYZ807=_=SOMEBODY.NAME@DOMAIN.COM, HighPriority, 08-Dec-2011_23.00.15, bigFatLog_08-Dec-2011_22.59.34.log
ABC05, 91XYZ525=_=SOMEBODY.NAME@DOMAIN.COM, HighPriority, 10-Dec-2011_10.01.36, bigFatLog_10-Dec-2011_10.01.00.log
ABC01, 93XYZ252=_=SOMEBODY.NAME@DOMAIN.COM, HighPriority, 12-Dec-2011_11.58.23, bigFatLog_12-Dec-2011_11.57.20.log
ABC03, 93XYZ543=_=SOMEBODY.NAME@DOMAIN.COM, HighPriority, 12-Dec-2011_23.34.07, bigFatLog_12-Dec-2011_23.33.23.log
ABC04, 92XYZ066=_=SOMEBODY.NAME@DOMAIN.COM, HighPriority, 13-Dec-2011_01.00.31, bigFatLog_13-Dec-2011_00.59.29.log
ABC05, 93XYZ184=_=SOMEBODY.NAME@DOMAIN.COM, HighPriority, 13-Dec-2011_01.54.41, bigFatLog_13-Dec-2011_01.54.04.log
&lt;/c&gt;
This assumes there are no embedded commas in the data, so it is safe to just [doc://split] on the comma. Otherwise, a module for parsing comma separated values like [mod://Text::CSV_XS] would be needed to parse the log.
&lt;p&gt;
And this is how I called it from the command line:
&lt;c&gt;C:\Old_Data\perlp&gt;perl t33.pl 20111201 20111211&lt;/c&gt;</field>
<field name="root_node">
943322</field>
<field name="parent_node">
943322</field>
</data>
</node>
