in reply to Calling an exe from perl on IIS

The system command will create a new process and return immediately while the process continues to run. Try using backticks to execute your external application. This waits for the spawned process to finish and can be used to slurp all of the data that the process wrote to STDOUT.

E.g.

my $data_file = "file.txt"; my $ret=`encrypt.exe $data_file`;

Inman

Replies are listed 'Best First'.
Re: Re: Calling an exe from perl on IIS
by iburrell (Chaplain) on Sep 04, 2003 at 18:43 UTC
    The system function waits for the process to finish. The only difference between backticks and system is that backticks capture the stdout from the program. If the output isn't needed, it is better to use system.