Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Call external Windows/win32 executable

by bofh_of_oz (Hermit)
on Jul 07, 2005 at 12:54 UTC ( #473079=note: print w/ replies, xml ) Need Help??


in reply to Call external Windows/win32 executable

You can use

$exitcode = system('path/to/your/file.exe arg1 arg2');

It will run the EXE, it will wait until it completes, AND you'll get the exit status...

--------------------------------
An idea is not responsible for the people who believe in it...


Comment on Re: Call external Windows/win32 executable
Download Code
Replies are listed 'Best First'.
Re^2: Call external Windows/win32 executable
by Ultra (Hermit) on Jul 07, 2005 at 13:04 UTC
    $exitcode = system('path/to/your/file.exe arg1 arg2'); $exitcode = $exitcode >> 8;

    see system for details.

    Dodge This!
Re^2: Call external Windows/win32 executable
by mosh (Scribe) on Jul 07, 2005 at 13:03 UTC
    I thought that "system" command work only in *nix OS, Do it work in Win OS as well ?

    Mosh.

      Yes, it works ;-)

      Dodge This!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-07-31 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls