There's no harm in calling glob() on a filename with no wildcards.
Indeed, there isn't.
Just glob all but the last argument.
No, that would be wrong. Just because globbing on a filename without wildcars is ok doesn't mean that the result of a glob gives you a fixed point.

Suppose for instance you have a utility that removes those files that are given as argument (like rm does). Let's call it remove. But, unlike rm, it globs its arguments - even when working in an environment that globs. Suppose you have a directory that contains the following files:

thesis_worked_on_for_the_past_four_years naked_perl_chicks.tar.gz parrot_1.0.0.tar.gz [a-z]*
And you want to remove that pesky file named [a-z]*. You call your program like this:
remove *a-z*
If you had called rm, the first three files would still be there, with the pesky file removed. However, remove, globbing its arguments, will remove the first three files, leaving the pesky file where it is.
Perl --((8:>*

In reply to Re^2: writing portable file processing scripts that use placeholders in filenames by Perl Mouse
in thread writing portable file processing scripts that use wildcards in filenames by holli

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.