Monks, I have a question regarding options and their use in Perl. The nature of my question is more academic and not necessarily context specific. In fact, I'm not even sure that options is the proper term I'm looking for.

I'm simultaneously learning Perl and creating my own modular program to decode a complex diagnostic file. This program, once completed will be used by many people across many machines. As such, there are going to be certain facets of the program that I'd like to be configurable based on user preference. An extremely generic description of the program is that it will take a raw data file and output the information to an Excel spreadsheet.

Regarding the user configurable options, I'd like for the user to be able to choose whether or not they want the Excel file color coded, whether they want certain sheets in the Excel file, directories for output file storage, etc... Ideally, I'd like to have a user config file of sorts where each user can set their default values on how they'd like to program to handle these steps of processing. Are these examples of something that would be handled through the use of ARGV passed arguments/options?

If so, could anyone help me wrap my head around these uses and how to implement them in code? I've read several articles and tutorials about options/arguments, but everything seems to be command line centric. I just can't seem to connect the dots. If there's any other resources that might help me understand these uses, I would greatly appreciate it. Thanks!


In reply to [General] Non-Specific Options Question by arblargan

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.