Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Perl calling command prompt?

by l.frankline (Hermit)
on Nov 27, 2006 at 08:07 UTC ( [id://586202]=note: print w/replies, xml ) Need Help??


in reply to Perl calling command prompt?

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.

Replies are listed 'Best First'.
Re^2: Perl calling command prompt?
by Corion (Patriarch) on Nov 27, 2006 at 08:14 UTC

    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://586202]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-25 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found