Before any other debugging, other than ensuring the code compiles, you should be checking that open() succeeded (unless you're already using autodie):
my $dst = "C:\\Users\\Administrator\\Desktop\\Perl_Scripts\\8312032_Se +curity.evtx"; my $src = "C:\\Users\\Administrator\\Desktop\\Perl_Scripts\\8312032_Sy +stem.evtx"; open (my $dsth, ">>", $dst) or die qq(can't open "$dst" for appending: $!); open (my $srch, "<", $src) or die qq(can't open "$src" for reading: $!); print {$dsth} <$srch>; close ($srch); close ($dsth);

or

use autodie; { open (my $dsth, ">>", $dst); open (my $srch, "<", $src); print {$dsth} <$srch>; }

That last block could be any type of block providing lexical scope. The print {$filehandle} LIST; construct makes it more obvious that you're printing to a filehandle object, rather than missing a comma in your arguments list, to both the programmer and to Perl. In list context, the diamond operator returns all lines from a file. You don't need to escape colons or underscores in a string or a regular expression.

For easy of readability, Perl can handle Windows paths with forward slashes (actually, Windows itself handles forward-slash paths fine, which is what Perl sends to the system -- its Windows built-in applications which force only backslash paths on you). So to prevent forgetting to backslash a directory separator and to minimize length of paths strings, you could represent them as:

my $dst = "C:/Users/Administrator/Desktop/Perl_Scripts/8312032_Securit +y.evtx"; my $src = "C:/Users/Administrator/Desktop/Perl_Scripts/8312032_System. +evtx";

In reply to Re^3: Win32::EventLog->Backup(), appending contents of new log to a saved one. by Anonymous Monk
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.