Thanks for the suggestion, I probably should have mentioned in the question that I tried appending the entire log, using the code

open (FH1,">>C\:\\Users\\Administrator\\Desktop\\Perl\_Scripts\\831203 +2\_Security\.evtx"); open (FH2,"<C\:\\Users\\Administrator\\Desktop\\Perl\_Scripts\\8312032 +\_System\.evtx"); while (<FH2>) { print FH1 $_; } close (FH1); close (FH2);

When I did this, the security log size increased in proportion

But I was not able to see any of the appended events from system when I opened security log using the Event viewer utility in windows.

There is also a bit of a logic problem with this method, but im sure that can be resolved if it works

Could it be that the log files are terminated and the Viewing utility stops reading after some sort of terminator??

Any insight will be very helpful

Whether the log file exists is displayed by the $^E variable in the case(So i think that part is ok).Any other ways to do it would be appreciated, but im still trying to figure out how to append to a saved log though.


In reply to Re^2: Win32::EventLog->Backup(), appending contents of new log to a saved one. by dannyd
in thread Win32::EventLog->Backup(), appending contents of new log to a saved one. by dannyd

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.