Hello wise and knowledgeable Monks. I am VERY new to Perl and am seeking some wisdom. I have created a script to do what I want manually but I'd like to use a cronjob and automate the process. I want to extract all information from a file based off of the previous days date, (a cron job will run the script every Wednesday). So for instance cron job runs Wednesday August 17 and will include all entries from start of day August 9 to end of day August 16 then send that collected information to new file. The format of the data file being parsed is as follows: 20110802-23:42:01,4 20110802-23:45:01,3 20110802-23:48:01,1 20110802-23:51:01,1 20110802-23:54:01,2 20110802-23:57:01,3 20110803-00:00:01,3 When I tried to automate the process my OUTFILE had no information in it. Thank you for any assistance or suggestions that can be provided. I'm slowly working my way through the 5th edition of the Lama book and Perl by Example and the Perl Cookbook. Darryl

In reply to Extract data based on dates and place in new file by dtbach

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.