On Fri, 8 Feb 2002 09:33:01 -0500, [EMAIL PROTECTED] (Bill -Osx- Jones) wrote:
> Not to be dumb as a stump, but are you saying that - under Win32 - > STDERR would not appear in the console window? That, because of > possibly internal Win32 issues, it must always be sent to a file? What I think he is saying is that, on Win9x (*not* NT or 2000 under cmd.exe, which is a bit more powerful than Win9x's command.com), * if you do nothing, then STDERR appears on the console. Your Perl script does not capture it even if you (try to) use something like `foo.exe 2>&1`. (Instead, you're likely to end up with a file called '&1'.) * if you try to redirect STDERR to a tied handle or to STDOUT before starting an external program (with backticks or system, for example), you're still not going to capture the application's STDERR. (I'm not sure where they end up -- whether on the console as before, or in nirvana.) * if you redirect STDERR to a file (or to another filehandle which ultimately points to a file), then the spawned application's STDERR messages will end up in the file, which can be examined programmatically -- not quite as convenient as having them show up in the result of `command 2>&1` but at least (a) they don't clutter up the console display, and (b) you're able to ascertain whether any output went to STDERR during the execution of the program. Bart may correct me if I'm wrong. Cheers, Philip