Ans has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Perl calling command prompt?
by l.frankline (Hermit) on Nov 27, 2006 at 08:07 UTC

    hi

    If my guess is right then ...it is the solution...

    You have to use "command" if your Windows OS is below 2000 like...

    system ("command");

    else if your Windows OS is greater or equal to Windows OS 2000 then use "cmd"

    system ("cmd");

    bye

    Don't put off till tomorrow, what you can do today.

      Windows provides $ENV{COMSPEC} to denote the shell, much like unixish OSes have $ENV{SHELL}, so a better way on Windows is to launch $ENV{COMSPEC}:

      system($ENV{COMSPEC}) == 0 or warn "Error launching '$ENV{COMSPEC}': $! / $?'";
    A reply falls below the community's threshold of quality. You may see it by logging in.