I'm working on a script that will monitor a set of directories for "stale" files, files that have been waiting to process for more than a specified time (typically about an hour). The way I have it currently set up, there is a script and a config file that contains the list of directories to be scanned. This file would get re-read each time the script runs (it would run every 15 minutess) so that if new directories are added, they can be added to the file without having to restart the program (ideally - there are still a few other tweaks and things I want to work out before I ask them admins to put this into production on one of our servers).

That's the background. I'm wondering if it is better to keep the list of directories in a separate file or to keep it in the script under __DATA__ and read that in each time the script scans the directories. Are there any advantages that anyone can see? The only one I can see at this point would be that everything is contained in one file. On the other hand, keeping the list in a separate file means that someone (not me) would not have to dig through the program to add a new directory (or take one away). Any other thoughts pro or con to keeping the list in a __DATA__ versus using a separate config file?


In reply to DATA versus config file by nimdokk

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.