Hi babah, welcome to perlmonks!

To improve your chances of getting the answer you expect, you should reduce your code to a Short, Self-Contained, Correct Example.

You can also do some work on the readability, and syntax of your code. First, you should use strict and warnings, they are cumbersome, but they let perl try its best at finding your mistake, and perl is really good at it.
This means that you'll have to declare your variables with my, which has two effects: telling perl what the proper spelling is so that it can catch a typo, and where it can be used (it is limited to the current block). BTW, local is not a local variable, it means that the changes you apply are only temporary.
You should also rename your variables to give them more recognizable names, push (@backupListB, $lineB); push (@backupList, $lineBC); pretty much looks like twice the same thing.

Because your code isn't easy to read, and you didn't provide input data, I can't tell you what the problem is for sure, but awk '{print $1" "$2}' does look suspicious. Maybe I don't know awk enough, but as far as I know, print $1, $2 should print the first two fields separated by a space, which I guess is what your code is trying to do. But actually, there's not much awk can do that perl can't, so you should drop the awk altogether and do all the work in perl, this will add another temporary value (the line before it is processed) to debug, or log when something wrong happens.


In reply to Re: To Check Last Upload Date on Amazon S3 by Eily
in thread To Check Last Upload Date on Amazon S3 by babah

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.