Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: (tye)Re: open, sleep, & print together cause an error

by zeno (Friar)
on Feb 10, 2001 at 04:19 UTC ( #57531=note: print w/ replies, xml ) Need Help??


in reply to (tye)Re: open, sleep, & print together cause an error
in thread open, sleep, & print together cause an error

tye, you are a smart, smart person. That worked. Here's what I ended up with:

use strict; use warnings; require IO::Handle; # <--- new open LOG,">foo.log" or die "can't open foo.log: $!"; <b>LOG->autoflush(1);</b> # <--- new while(1) { print LOG (localtime).": something\n"; sleep(5); }

Thanks a lot for your help, tye. -zeno


Comment on Re: (tye)Re: open, sleep, & print together cause an error
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2015-07-02 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls