Actually, I already know what chars windows does/doesn't allow in filenames. Your assumption is slightly wrong though, vis.

C:\test>echo .>' C:\test>dir Volume in drive C has no label. Volume Serial Number is 8C87-E163 Directory of C:\test 02/08/20 02:55a <DIR> . 02/08/20 02:55a <DIR> .. 02/08/20 02:55a 3 ' <<<<<! 02/08/13 03:12p 210 178232.pl

In an earlier thread the following:

... @ARGV = map glob, @ARGV; ...

was advised against because "someone might pass in an escaped (eg.what\*ever) filename containing glob chars", and that might cause the above snippet to "break" on *nix environments. I thought then and I am asking now:

1) Why would anyone wish to embed "*" in a filename? Other than shear perversity.

2) How would this break?

Surely, globbing filespec of "what\*ever" is going to match the file named "what*ever"? Granted it might also match "whatifever" etc. but (see Q.1).

I guess I accept that OS's in general (*nix included) have to reserve some chars in filenames and other system entities (try creating a file "feet/sec" on *nix?).


In reply to Re: Re: Re: Re: Re: Using * character to open all Files in the directory by BrowserUk
in thread Using * character to open all Files in the directory by Prayag

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.