in reply to Re^3: Opens but Won't Write to file
in thread Opens but Won't Write to file
Actually, the OP already has IO::Handle loaded (via IO::Socket via IO::Socket::INET), so it's free for him.
For others, it has a one-time cost of 100ms.
>perl -le"use Time::HiRes qw( time ); $stime=time; require IO::Handle; + $etime=time; print $etime-$stime;" 0.082003116607666 >perl -le"use Time::HiRes qw( time ); $stime=time; require IO::Handle; + $etime=time; print $etime-$stime;" 0.0974130630493164 >perl -le"use Time::HiRes qw( time ); $stime=time; require IO::Handle; + $etime=time; print $etime-$stime;" 0.120858192443848
It's up to them if that's acceptable or not. If it's not, I suggest copying autoflush out of IO::Handle and call it as follows rather than twiddling with select and $| directly.
autoflush(HANDLE, 1);
|
|---|