It really does sound like you're output is buffered. Did you select the filehandle before changing $|? If not, you're setting autoflushing for the currently selected handle (presumably STDOUT).
open(FILE, ... { my $old_selected = select(*FILE); $| = 1; select($old_selected); } print FILE ...
In reply to Re: Odd behaviour from print statement
by ikegami
in thread Odd behaviour from print statement
by periapt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |