Open Question: Windows processes should support %ENV as part of their POSIX support. What is be the corresponding secure Windows-NON-CYGWIN-idiom for the Unix shell's variable interpolation w/o word splitting, i.e. "$f"?
Windows processes do have an environment block, but it is nothing to do with POSIX support. Do not confuse the operating system with the shell - Korn shell 93, for example (via uwin) runs on Windows. It is not that difficult to write a shell which runs on UNIX and Windows (I have done it, so it can't be hard).
The Microsoft cmd.exe shell only uses double-quotes (as does awk) but does not use the $ operator to get a variable value, as is common in some shells, but it uses the % delimiter, as in %PATH%. Coming from a UNIX background I think it is safe to say that cmd.exe does not support interpolation as we know it. By the way, environment variables in Windows are not case-sensitive, so %PATH% is the same as %path% (unlike the c-shell). For example:
C:\>set fred=42
C:\>perl -e "print \"$ENV{FRED}\n\""
42
Cygwin (and uwin) makes Windows environment variables UPPERCASE, and is case-sensitive.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.