Your code has a side effect.
print $fh ('test');
and
print('test');
both end up in the file, when a filename is specified. I don't think that was your intention.
To set auto-flushing, do
{ my $f = select($fh); $|=1; select($f); }
instead of
select($fh); $|=1;
In reply to Re^2: Filehander Question
by ikegami
in thread Filehander Question
by EchoAngel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |