Clear questions and runnable code
get the best and fastest answer
flushing by defaultby spx2 (Chaplain)
|on Jan 19, 2008 at 17:28 UTC||Need Help??|
spx2 has asked for the
wisdom of the Perl Monks concerning the following question:
I have spent the last 50 minutes trying to figgure out why
a print to a file didn't work.
I usually do this fast this way:
However this time I had 7 files opened at the same time(not that this should make any difference...).
and the print didn't wanted to work,I have put the open and the print in an eval,tried warn $@ , and no luck.
I have talked with some friends who instructed me into use IO::Handle and ->autoflush(1) the filehandles wich eventually worked.
I am interested in how I can make autoflush a default behaviour for all of the filehandles I open
Does this have any disadvantages ?