Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
That does work, but it splits out the lines that i am looking for so when i run it i end up with.
#!/usr/bin/perl open(MYFILE, "log.log"); while (<MYFILE>){ s/\s+$//; if (/Message\sdump:/) { my $nextLine = <MYFILE>; $nextLine =~ s/\s+$//; print "Found=$nextLine\n"; # do stuff with the next line here. } }

Found=23 06/02/23 11:19:34:750 Received FIX message Found=8=FIX.4.29=024935=D34=743=N49=COMPLEX_EXLINK50=DBL9991456=EXLINK +_COMPLEX57=COMPLEXGATE97=N52=20060223-11:18:4660=20060223-11:18:46207 +=XEUR55=XEURFDAX0F2006H200=20060340=259=044=58681=L60954=111=Order58: +1:1140693526109=DBL9991421=238=1167=FUT10=096
When the format is
Message dump: 8=TEST.4.29=038435=849=TEST56=TEST50=COMPLEXGATE57=DBL9991134=852=2006 +0223-11:19:351=L6096=0.000011=Order58:1:114069352614=0.000017=11193 54210120=031=0.0000000032=0.000037=132710015138=1.000039=854=155=XEURF +DAX0F2006H58=EUREX Error PRICE60=20060223-11:19:34150=8151=1.0000109= +D BL9991463=0167=TEST=200603207=TEST=244=5868.0000000010=101 25 06/02/23 11:20:00:765 Received TEST message Message dump: 8=TEST.4.29=025135=D34=843=N49=TEST50=TEST=TEST57=COMPLEXGATE97=N52=20 +060223-11:19:1060=20060223-11:19:10207=XEUR55=XEURFDAX0F2006H 200=20060340=259=044=5867.51=L60954=111=Order63:1:1140693551109=DBL999 +1421=238=1167=FUT10=166 26 06/02/23 11:20:01:500 Sent TEST Message Message dump:

In reply to Re^4: Matching string, then getting next line by minixman
in thread Matching string, then getting next line by minixman

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (4)
    As of 2019-10-19 01:55 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?