I'm trying to create a script that will accept the following command line syntax:
microgen -cf *.cfg -cf /users/someone/goofy.cfg -ts *.vh
which will create a list of configfiles (-cf) and a list of textsub files (-ts). The problem is that @ARGV keeps expanding the file globs so I can't tell what switch a given file is supposed to be associated with. I would like to be able to hold off the file-globbing until I've identified which array to stuff the globbed files into. I've come up with an inelegant way of doing this, which is to assume that any files appearing after a given switch belong to that switch's array until I hit a different switch. But that just feels so *wrong*. Any ideas? -Grebki

In reply to How can I stop ARGV from globbing all over the place? by grebki

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.