Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: open, sleep, & print together cause an error

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


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

Hi arhuman, this code ended up working, too. Now I have a couple of alternatives!:

use strict; use warnings; open LOG,">foo.log" or die "can't open foo.log: $!"; my $selected = select(LOG); $|++; select($selected); while(1) { print LOG (localtime).": something\n"; sleep(5); }

Thanks a lot, arhuman. -zeno


Comment on Re: 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://57533]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2014-10-01 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (31 votes), past polls