http://www.perlmonks.org?node_id=1001546


in reply to Re: pipe perl
in thread pipe perl

A very important element for this solution (which goes unmentioned above) $| = 1. This turns off buffering on the output stream, or "sets the pipe to hot" (see perlvar). If you are having buffering issues, you can also close your file handle to clear the buffer.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.