Fellow Monks,
i am in need of your assistance. I want to write a script that will need to do multiple tasks, not all at once.
  • I am going to connect to a pdc and get it to dump a list of machines it has as memebers of the domain.
  • for each machine it has listed in the domain i am then going to do a ip address lookup and pipe the results to a text file.
  • From there i want to ping the machines to see if they are still alive. and pipe the results to a text file. (we have gone through about 200 old machine names as we recycle hardware from production to qa and also introduce new machines to production.)

    So with all that in mind, would it make more sense and also be cleaner if i created a module with all the work that i wanted done and call on it from the script? i have scripts that will do everything that i want to do except for the pinging hosts. I will research and try to impliment Net::Ping. Any advice would be greatly appreciated. I have never created a module, so any advice on how to get it started would be great appreicated also. I will post final code once i figure out the best way to do this. Thnx in advance
    Ray

    In reply to cleanest/most efficient way to do this by RayRay459

    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.