Frankly I don’t know Perl at all. I have to solve a problem using perl for some reasons. I tried searching for quick solutions and couldn’t find any (my bad)
Problem: I have got a file that has list of file names and a timestamps (i.e. 2012-05-24T18:19:35.000Z) in it.
I need to parse identify which of these are more that 90 days old.
I just need the check, everything else I think I have got in place already. When I googled some people suggested using some fancy datetime packages while some suggestions were around using of -M.
Quite confused actually. All help appreciated. Thanks.
That date format has the advantage that doing a lexicographical comparison between two of those string is (just about) the same as doing a date-time comparison. So you just need to get the date 90 days in the past into that format, and doing a string comparison.