Hi Marshall,
Program 1's error messages come out right way while stdout messages come later because the stdout's filehandle's output buffer is not ready to be "flushed", "printed".
Sorry, but that's not quite correct either. If run from the terminal, your Program 1's STDOUT will be line-buffered and will flush its STDOUT on every newline, but the order in which STDOUT and STDERR output is intermixed on the terminal is AFAIK not well-defined. On my machine, the output of both programs looks the same when run from the terminal.
See also my post here.
Regards,
-- Hauke D
In reply to Re^7: Need sleep walking help
by haukex
in thread Need sleep walking help
by Todd Chester
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |