Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress "print" from program in "do" command

Status
Not open for further replies.

aj2taylo

Programmer
Nov 4, 2002
17
CA
I have a segment of code like:

do "some.cgi";

This obviously executes some.cgi, however I would like to do the following:

1) I wish to suppress whatever gets printed from some.cgi

2) Ideally, I'd like to do something like "$result = do "some.cgi"; ", but not sure if this is possible. Keep in mind, I don't want to do a system call, as there may be a large amount of tainted data I'll have to pass in at some point.

Any thoughts?

Thanks,

Andrew
 
Hello Andrew,

If some.cgi prints to STDOUT without doing any clever tricks you could re-open STDOUT to some other file.

Mike

"Deliver me from that bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top