in reply to PERL stopped working for built-in DOS functions under XP

What output do you get from both machines if you run this one-liner from a command line?

c:>perl -le"print $ENV{comspec}"

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW

Replies are listed 'Best First'.
Re^2: PERL stopped working for built-in DOS functions under XP
by ikegami (Patriarch) on Jul 23, 2009 at 21:59 UTC

    COMSPEC isn't used.

    >perl -le"print '[',`dir /b a`,']'" [a ] >set COMSPEC=notexist.exe >perl -le"print '[',`dir /b a`,']'" [a ]

    Update: On the other hand, a bad PATH would be a problem.

    >c:\progs\perl5100\bin\perl -le"print '[',`dir /b a`,']'" [a ] >set PATH= >c:\progs\perl5100\bin\perl -le"print '[',`dir /b a`,']'" []