Think about Loose Coupling | |
PerlMonks |
Re: exec, system, or backticks (or open)by jmanning2k (Pilgrim) |
on Oct 22, 2004 at 14:43 UTC ( [id://401495]=note: print w/replies, xml ) | Need Help?? |
Reading the other comments, it appears you do want the output.
Backticks will work well for this situation, but not the way you used them. Try:
instead of the shell redirection. This runs the entire program, and then gives you all the output. If your program would do well reading the output line by line as the program outputs it, you will get a faster response with an open call. Just follow the program name with a pipe character, and perl will attach to the program's STDOUT. But that depends on if you need the entire results, or you want to process it line by line. It is just yet another way to read output from a program, but since it hasn't yet been mentioned, and has the advantage of line-by-line processing, I thought I'd mention it. ~J
In Section
Seekers of Perl Wisdom
|
|