Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by ikegami (Pope)
on Oct 30, 2009 at 22:16 UTC ( #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);


Comment on Re^4: Opens but Won't Write to file
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-11-28 18:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (199 votes), past polls