first off, can you post some data, so we know what you're reading in?

looking at your script, there are a few things that could be improved upon.
~you're using warnings twice, with perl -w, and use warnings. you don't need both.
~why is use strict commented out?
~this is confusing~

#Look only at the summary lines where $_ == 560 while (defined ($_ = <FILE>)) { next unless ($_ =~ /560/); #we only want the files with 560 $_ =~ s/`/,/g; #this is here to get the user name because ' i +s after name @x=split(/,/); if (!($x[16] =~ /Primary User Name: CISERFS1/)) { #dont want t +he details from the sytem
probably it's better to split first, then search on the filename field, otherwise you may run into a year 2560 bug ;)
something like
#Look only at the summary lines where $x[???] contains '560' while (<FILE>) { @x=split /,|`/; next unless ($x[???] =~ /560/); #we only want the files with 560 unless($x[16] =~ /Primary User Name: CISERFS1/) { #dont want t +he details from the sytem
~also, you are assigning temporary variables, but i don't see a real need, if you're only printing them.
try print OUTPUT "$x[1] $x[2] $x[12] $x[16] \n";

~Particle


In reply to Re: parse a log file by particle
in thread parse 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.