Input file

DEBUG 29 Apr 2012 23:33:53,428 [Single-Threaded-Persistence] Unpersist +edMessageStore - Firm ==> os7759N DEBUG 29 Apr 2012 23:33:53,428 [Thread:UnprocessedMessageProcessor-] U +nprocessedMessageProcessor - Size of previousOrders : 0 DEBUG 29 Apr 2012 23:34:04,337 [inputAdapterInboundTransportQueueDispa +tcher0] AbstractNonBlockingMessageConsumer - Received message <{ (180 +01)="8=FIX.4.29=10435=A34=15000049=os7759N50=*52=20110131-22:07 +:34.71856=CME57=G95=396=AS0142=DESK12398=0108=301007=21005=Y +1006=25010=203" (18002)="LOGIN_REQUEST" (20002)="101010" (18008)=" +1" (50001)="202020" (18004)="os7759N" (18003)="*" (18009)="null-null- +100" }> DEBUG 29 Apr 2012 23:34:04,417 [WorkerThread : os7759N] ClientResponse +CreatService - User group name : null DEBUG 29 Apr 2012 23:34:04,417 [WorkerThread : os7759N] ClientResponse +CreatService - Re populating REQ Originator 18011 : null DEBUG 29 Apr 2012 23:34:04,419 [WorkerThread : os7759N] ClientResponse +PublisherService - Publish message to Client completed-> [18002]="LOG +IN_ACK" [18003]="*" [18004]="os7759N" [18008]="1" [18009]="null-null- +100" [18010]="LOGIN_REQUEST" [19001]="8=FIX.4.29=10235=A34=049=CM +E50=G52=20120430-04:34:0456=os7759N57=*142=OECLoc143=DESK12336 +9=01001=N1002=Y10=238" [20002]="oecache_primary_dev2" [50001]="fe +dvog01c"

i have to do 3 things

first i need to pic the time value(23:34:04,419) of the line containing "AbstractNonBlockingMessageConsumer - Received message"

second i need to pic the time value value of the line containing "ClientResponsePublisherService - Publish message to Client completed"

then i have to find the diffrence b/t the time

can any one help me out plz.. here i am attaching my code also
#!/usr/bin/perl use strict; use warnings; open (FH ,"C:\\Users\\saahmad\\Desktop\\girish\\oecache_primary_dev2.l +og_bck") or die "$!"; my @new_rm = ""; my @new_rm_id = ""; my $new_rm_id = ""; my @new_pm = ""; my @new_pm_id = ""; my $new_pm_id = ""; my $tag1 = ""; my $tag2 = ""; my @tag18009 = ""; my @time = ""; while (my $line = <FH>) { chomp($line); if ($line =~ "AbstractNonBlockingMessageConsumer - Received messag +e"){ if ($line =~"(18009)") { $tag1 = 1; my @tag18009 = split (" ", $line); my $val_1 = "$tag18009[18]\n"; push (@new_rm_id , "$val_1"); push (@new_rm , "$tag18009[6]\t$tag18009[4]\t$tag18009[18] +\n"); #print "$new_rm[0]"; } } if ($line =~ "ClientResponsePublisherService - Publish message to +Client completed"){ $tag2 = 1; #if ($line =~ "35=8"){ #if ($line =~ "39=0"){ my @time = split (" " , $line); my $val_2 = "$time[20]\n"; push(@new_pm_id , "$val_2"); push(@new_pm , "$time[9]\t$time[4]\t$time[20]\n"); #print "@new_pm====>\n" #} #} } } #print "@new_rm\n"; #print "@new_rm_id\n"; #print "@new_pm\n"; #print "@new_pm_id\n"; for(my $i=0;$i<=scalar(@new_rm_id);$i++){ #print "$new_rm_id[$i]"; if ($new_rm_id[$i] = $new_pm_id[$i]) { print "$new_rm[$i]\n"; } } close (FH);

In reply to parsing problem by sarf13

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.