The problem that you don't see anything in temp12 should not have anything to do with the perl program. Maybe you are looking into the wrong temp12 file. Check the directory listing. When you are writing to a file at a specific time the file must have that excact time in the directory listing. If not you are looking at a different file or a file you can't write to.

About your concern: It was already suggested to you that your script will not find (multi line) log entries that start while a previous (mulit line) log entry isn't finished. Suggested remedies were to only look for the success and failure lines or keep a hash of entries so that you can work on more than one (multi line) log entry at the same time. Did you check if this is the case?

To find out what is happening in your program, find the first log entry that should have been found but wasn't. Then copy the log file and edit the copy so that that specific log entry is at the start of the log file. If the log entry is found now, you know that previous log entries prevented this from being seen (quite probably the problem I mentioned above). If it still isn't found, use the perl debugger and single step through the code. Or use print statements to find out where the script diverts from your expectation


In reply to Re^3: wrong output by jethro
in thread wrong output by namishtiwari

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.