use : $| =1; open(COMMAND, " command | "); while(<COMMAND>){ print STDOUT; ## do whatever you want with $_ } close COMMAND; __END__ you can then read the output and print it and whatever. -----Original Message----- From: kevin.schmidt@convergys.com [mailto:kevin.schmidt@convergys.com] Sent: Wednesday, February 06, 2002 9:54 AM To: beginners@perl.org Subject: Not your average system() question... I understand how the system command works. I understand the difference between system() and backticks. My question is this: I want to make a call to an external program and I want the output printed to the command line as it is processing, BUT, I also want the output returned to me so that I can parse and check it for certain conditions. Basically I need the functionality of both system() and backticks. How do I accomplish this? I looked into redirecting STDOUT, but didnt see how it was possible. HELP PLEASE! Kevin Schmidt Cincinnati, OH -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected. -- To unsubscribe, e-mail: beginners-unsubscribe@perl.org For additional commands, e-mail: beginners-help@perl.org ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc.Thread Previous | Thread Next