* Raj <>:
> What does:
>
> $|=1; select(STDOUT);
>
> do? I understand that STDOUT is selected as the default handle, but what
> about the bit preceding it?
$! = output autoflush. STDOUT is typically line buffered, which means
that there will often be a delay in seeing output if you're piping to
another process (CGI and rsh are two examples). By setting $| to a
non-zero value, you 'turn off' the buffering (actually, it flushes using
fflush(3) after each command that should be piped to STDOUT, usually
print or write).
--
Matthew Weier O'Phinney
http://weierophinney.net/matthew/