Once again, I turn to the wisdom of the ages for Perl.

I've written a procedure that reads (grep) a file, finds certain parameters, spits them back out to the screen, and loops in a defined amount of minutes that the user is asked for. (The file is updated constantly by another 3rd procedure)

At the bottom of the print out, (After reading `date`) I print out what time this print out is, and I would like to print out the next time the print out will occur.

IE: Here's your search term, review it every x minutes, here's the time I reviewed your file.

MY QUESTION: So besides splitting the `date` into arrays and scalars, adding the time loop to the minutes, then reconstructing the time to print it back out, is there a function (Or more economical way) in Perl that can do this?

My way will work, but I've got a lot of lines for a single line of printout that is just a courtesy to the user.

note: I haven't replicated the script here because it is in my work space, and the customer does not allow material outside of their steel box!! I'd have to retype it completely.

Any thoughts or suggestions would be appreciated.
Thanks everyone,
Bruce


In reply to TIME: Adding Up and Predicting it by brusimm

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.