Geez! I have no idea exactly what I was thinking 2 years ago and why my post was so terse - could be a lot of reasons behind that!

There is no way to use glob() on an array.
If I knew how to do that, I would have said so! The closest "glob like" solution is what ikegami pointed out in his also very terse post.
use Text::Glob qw( match_glob glob_to_regex ); Of course those functions are not glob() itself. This module generates a regex "under the covers" and then uses it.

My post shows the block form of grep, which I prefer. I guess I could have said things like this eliminates a module dependency and will execute faster. I could have also said: "When you think about a subset of an array, think grep. grep could have been called 'filter'". If you are having trouble with simple regexes, we can help you with that. For some reason, I didn't say any of that. I just showed how to do it with grep in a very terse post.

Very few, if any Monk posts are destined to be included in the tomes of Western Literature.
From the comment to my post, other Monks did examine and review what I said at the time. And I made adjustments to their messages with appropriate credit given.
I find your critique of my post odd because you aren't asking about a clarification of details that you plan to use yourself in your own coding.


In reply to Re^3: glob an array? by Marshall
in thread glob an array? by morgon

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.