"be consistent" | |
PerlMonks |
Pipes vs. temporary filesby Anonymous Monk |
on Jul 25, 2007 at 17:40 UTC ( [id://628739]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Wise Monks, I need to read in a large amount of data produced by another program. The data are output to STDOUT. In my code - I can read the data in as a pipe from the process, or, I can execute the process, redirect the output to a temporary file, and then open the file in perl and proceed from there. My questions are: How fast is a pipe compared to a temporary file? (assume the file is on a local filesystem) Does using a pipe use any large amount of temporary storage "behind the scenes?" (Memory or disk) Does using a pipe affect the buffering that Perl does? (Again, this goes to the speed question.) Are pipes purely synchronous? Any help or ancedotes would be greatly appreciated.
Back to
Seekers of Perl Wisdom
|
|