Hi Monks,
I need a little help here please, I had a similar code before, but I can't find it anymore.
All I would like to do is, having a program that will go through all my directories in my server
looking for a file called myerror.txt and do a check like, if the date found is older than a month from today's date, I need to compress this file and clear it's content up to the month old date. Can someone help me with that ?
Heis a sample of this log file:
[Mon oct 19 10:33:31 2005] par.pl: Undefined subroutine CGI::one_min
[Fri nov 19 03:05:23 2005] par.pl: Undefined subroutine CGI::one_min2
[Thu Jan 19 09:45:39 2006] test.pl: Undefined subroutine CGI::end_test
Thanks a lot!
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.