Checking from your last post Re^4: Parsing my script out put? and your OP, I think what you are trying to do is to check by check I mean to compare dataset in your logfiles using the time-stamps, if I understand what you are trying to do (I hope so).
If that is correct, then you could do this:

#!/usr/bin/perl -wl use strict; use Data::Dumper; my %data; while (<DATA>) { my @ts = split; if ( $ts[0] =~ /(.+):(.+?)$/ ) { push @{ $data{$1} }, [ $2, @ts[ 1 .. $#ts ] ]; } } print Dumper \%data __DATA__ 20:21:09:366500902 94.102.XX.XX > 63.77.X.X 65 20:21:09:484721194 63.77.X.X > 94.102.XX.XX 140 20:21:10:367148691 94.102.XX.XX > 81.192.X.X 65 20:21:10:432251992 81.192.X.X > 94.102.XX.XX 140 20:21:11:367836444 94.102.XX.XX > 103.229.X.X 65 20:21:11:665980944 103.229.X.X > 94.102.XX.XX 149 20:21:12:368606359 94.102.XX.XX > 69.33.X.X 65 20:21:12:588588107 69.33.X.X > 94.102.XX.XX 149 20:21:13:369344850 94.102.XX.XX > 85.32.X.X 65 20:21:13:396157789 85.32.X.X > 94.102.XX.XX 150 20:21:14:369986605 94.102.XX.XX > 4.28.X.X 65 20:21:14:518849388 4.28.X.X > 94.102.XX.XX 142 20:21:15:370662851 94.102.XX.XX > 217.153.X.X5 65 20:21:15:437401662 217.153.X.X > 94.102.XX.XX 143 20:21:16:371366478 94.102.XX.XX > 61.93.X.X 65 20:21:16:686433904 61.93.X.X > 94.102.XX.XX 142 20:21:17:372028662 94.102.XX.XX > 82.166.X.X 65 20:21:17:469587225 82.166.X.X > 94.102.XX.XX 141
Output:
$VAR1 = { '20:21:17' => [ [ '372028662', '94.102.XX.XX', '>', '82.166.X.X', '65' ], [ '469587225', '82.166.X.X', '>', '94.102.XX.XX', '141' ] ], '20:21:15' => [ [ '370662851', '94.102.XX.XX', '>', '217.153.X.X5', '65' ], [ '437401662', '217.153.X.X', '>', '94.102.XX.XX', '143' ] ], '20:21:13' => [ [ '369344850', '94.102.XX.XX', '>', '85.32.X.X', '65' ], [ '396157789', '85.32.X.X', '>', '94.102.XX.XX', '150' ] ], '20:21:16' => [ [ '371366478', '94.102.XX.XX', '>', '61.93.X.X', '65' ], [ '686433904', '61.93.X.X', '>', '94.102.XX.XX', '142' ] ], '20:21:12' => [ [ '368606359', '94.102.XX.XX', '>', '69.33.X.X', '65' ], [ '588588107', '69.33.X.X', '>', '94.102.XX.XX', '149' ] ], '20:21:10' => [ [ '367148691', '94.102.XX.XX', '>', '81.192.X.X', '65' ], [ '432251992', '81.192.X.X', '>', '94.102.XX.XX', '140' ] ], '20:21:09' => [ [ '366500902', '94.102.XX.XX', '>', '63.77.X.X', '65' ], [ '484721194', '63.77.X.X', '>', '94.102.XX.XX', '140' ] ], '20:21:14' => [ [ '369986605', '94.102.XX.XX', '>', '4.28.X.X', '65' ], [ '518849388', '4.28.X.X', '>', '94.102.XX.XX', '142' ] ], '20:21:11' => [ [ '367836444', '94.102.XX.XX', '>', '103.229.X.X', '65' ], [ '665980944', '103.229.X.X', '>', '94.102.XX.XX', '149' ] ] };
In which one can easily, compare, take the difference of several values and arrange the print out as desired. That is left for the OP.
Hope this helps.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

In reply to Re: Parsing my script out put? by 2teez
in thread Parsing my script out put? 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.