With POSIX support I meant the libc and lower portions of POSIX and I was under the impression that e.g POSIX exec() was part of whatever was once enough to give Microsoft some claim of POSIX compatibility certifications for NT and later. Looks like I badly misremembered things.

My original question is the reverse of your example:

Can I e.g. set $ENV{VARIABLE} in a non-CYGWIN-port of Perl, and then use system q{dir "%VARIABLE%"} to have cmd.exe expand the variable? More specifically, what happens if the variable contains [\n \\;"']?

A new question/request:

What I'd love to do is appending a link to a node giving the comparable portable (or windows) version of $ENV{f}="a b; 'c'"; system q{dir "\$f"}.

Alternately at most a single concise paragraph as a footnote on the windows side of things to Re: *SAFE* use of string in system command.

Otherwise its a bit unfair if the Unix view hogs all the good keywords and doesn't help a windows SoPW :)


What I currently have - after some searching on PerlMonks - is a mess and a headache (and a bit of glee in lacking the windows environment to test this mess).

It reads like system/exec/(pipe-)open should be avoided on Windows for non-trivial commands, preferring IPC::System::Simple or Win32::Process::Create instead.

Do we have a better explanation or tutorial already on PerlMonks or do you know of a suitable resource outside?
Merci!

cu & thanx, Peter -- hints may be untested unless stated otherwise; use with caution & understanding.

In reply to Windows viewpoint?-- Re^3: running programs from PERL by jakobi
in thread running programs from PERL by metalnut

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.