Esteemed Monks

I need your guidance with filtering this log file since I am a bit novice when it comes to RegEx.

I have the following log file;
========== ======== ======= ==== ===== += ====== ================== START TIME END TIME VERSION USER SOURC +E STATUS STATUS DESCRIPTION ========== ======== ======= ==== ===== += ====== ================== August 26, 2004 1:21:04 AM August 26, 2004 1:22:16 AM 2.0 sys +tem HA038974 Pending [BATCHMODE]Started installation pro +cess September 5, 2004 2:49:03 AM September 5, 2004 2:49:37 AM 2.0 + system HA038974 Pending [BATCHMODE]Started installation + process September 16, 2004 12:32:34 PM September 16, 2004 12:33:26 PM 2. +1 [kotzel_sup] HA038974 Pending Started installation proc +ess September 16, 2004 4:44:28 PM September 16, 2004 4:44:34 PM 2.1 + [kotzel_sup] HA038974 Finished 23 Successful, 8 Failed
I need to capture the start times (only the date without the times) the status and the status report.

So, I wrote this bit of code
use strict; open(HIST, "c:\\History.log") || die "\n$_ : No log file was found\n"; chomp(my @status = <HIST>); for my $line (@status) { next if ($line =~ /=+|START TIME|^\s+$/); #print "$line\n"; $line =~ /^(.+)\s+\w+\s+(\w+)\s+(.+)$/; print "\n\n$1, \n$2, $3\n\n________________________\n" ; }
However, its not working (* what a surprise *) and i think its because the RegEx is not correct.

I have rustled with it for sometime now, to no avail! Can an enlightened monk please give me some guidance or help me with this?

Thanks.

In reply to RegEx : Filtering a log file by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.