Efficiency in what domain? Execution time is probably not a large concern (imo), because the time that it would take to start the Apache process will likely outweigh any amount of perl code that would be doing the checking.

I would be asking myself about the most efficient way to manage the maintenance of these lists. Does the set of Apache processes change? Do you need to allow other people to manage this list? Does this list of Apache processes need to be able to be moved around to different back ends?

Your solution for storage of this list may end up being a simple my @host_list, a configuration file with the necessary information that can be re-read as necessary, all the way up to a DB (small as it may be) where each back-end is able to start and stop Apache servers as the configuration changes.

--MidLifeXis


In reply to Re: Efficient Automation by MidLifeXis
in thread Efficient Automation by jmneedhamco

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.