Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Opens but Won't Write to file

by ikegami (Patriarch)
on Oct 30, 2009 at 22:16 UTC ( [id://804227]=note: print w/replies, xml ) Need Help??


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);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://804227]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 08:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found