in reply to running status
When executed via backticks you will get the results of the program execution, but not until the command finishes executing.
When $status is used with system, the only thing returned is the error code.
What you probably want to do is to run the command as a piped process using open. Here is a very simple example, but you can find more complex examples in either the Programming Perl, Third Edition or Perl Cookbook:
This will allow you to read the output of the program as it is running instead of after it's done. HTH.open OGGENC, "c:/oggenc.exe c:/test.wav|" or die "Can't open oggenc.ex +e $!";
--Jim
Update: D'oh! Didn't see that you had tried the example, however, it should work for you. Show us your code as maybe there is an error that we can help fix. Also, you're not testing for errors on the open statement and that may provide useful information.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: running status
by marauder (Novice) on Jan 12, 2002 at 23:06 UTC | |
by jlongino (Parson) on Jan 12, 2002 at 23:39 UTC |