I call command line tools constantly as the third-party application's API is not exposed to Perl any other way.
I am wondering why there are at least three options for executing a command line (including backticks, system() and pipe), if there is a "best" way to invoke a command line, or what factors are taken into account to determine which to use. Generally I want the program to wait for the command to complete (so I think exec() is not an option), and I want the return code, STDOUT and STDERR from the command (so I don't think system() works for me as it doesn't give the command's output. I would assume that the pipe is most flexible, but I was unable or too lazy to get it working reliably. If this is the right approach I will give it more time. So I generally use backticks, but what I (sometimes) don't like about this is that it merges STDOUT and STDERR unless I redirect each to a temp file. Since sometimes I actually do want the ordered mix, I guess I want one routine that returns an associative array of everything - OS return code, STDOUT, STDERR, and merged STDOUT and STDERR, without using temp files. TIA, -John -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>