Well first you are going to have to find some delimeters. Looks like "Data Record:" is your delimeter so you should be able to first build an array based on this brash untested code
open(MYFILE, '/dir/logfiles'); @data = MYFILE; foreach $line (@data) { if ($line =~ /^Data Record:(.*)/){ push(@push, $1); }else{ next; } }
While writing this though I realize that this does not some up what I think it is you want done. You need to deciphers the format of delimeters between entries in the recored, ie a COMMA, and maybe a ; at the end of the record. Possibly a cut and paste of the document we are viewing could help better assist you, along with what you are trying to get out of this, Ie... propagating a database with these entries, iterating a count to a flat file or web page on how many failures as opposed to success's. Please elaborate.
Tradez
"Never underestimate the predicability of stupidity"
- Bullet Tooth Tony, Snatch (2001)

In reply to Re: Parse/Split Log File by tradez
in thread Parse/Split Log File by DavidL

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.