Hi, I've got a unique situation. I'm trying to get perl to monitor a database file. Basically, I'm starting the program and having it sleep 30 minute and then check the database again for a new record. What I need to do is any time there is a new record found, it creates a file.

---Everything works up to this point--- The part I don't know how to do is have another program monitor that folder where the new files are created. When a new file is created, it needs to be emailed to another person. I've got the emailing attachments side of things down. I don't know how to get a perl program to monitor the file folder, and when a new file pops up, it will email only that file to the customer. Any help is appreciated!

I love it when a program comes together - jdhannibal

In reply to Directory Questions - How would I do this? by jdlev

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.