Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

As long as you're going to be picky about CMD.EXE vs OS, I'll point out that no OS expands wildcards. It's only the shells that do. So, space_monk's original statement was wrong, but I think that this is just nit-picking, which is why I didn't draw attention to it in the first place. I only bring it up to show why your complaints about CMD.EXE are barking up the wrong tree. We know what he meant, and I didn't see any need to draw up the difference.

Further, your workaround is unlikely to be useful on any OS/shell when the shell isn't involved, such as using system LIST. So knowing to use glob (or not) is still relevant.

By the way, looking at the workaround, I see it's entertainingly wrong anyway. $ENV{SHELL} is also set by 4dos/4cmd by JP Software, and I assume their Take Command products as well. However, they are compatible with the CMD shell (and command.com prior) by not expanding wildcards. I used to use their 4OS2 product way back when, I'm sure I still have the registration codes around the house somewhere. And that's how I found out about the SHELL env var in the first place.

So it's probably a good idea to understand how the various shells work and don't work, how to use glob, when to use it, and what it means if you don't use it. It does make it harder to automatically expand or not, but there are still cases where it doesn't matter the shell or OS or Cygwin or anything (input files).

And, by the way, it's pretty rare that you need to escape the wildcards on systems where the shell does expand them. Re-globbing already-expanded filenames will usually not do anything.


In reply to Re^4: Replace strings in multiple files by Tanktalus
in thread Replace strings in multiple files by najiz

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others browsing the Monastery: (11)
    As of 2014-12-29 13:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (187 votes), past polls