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); }
|
---|
In Section
Seekers of Perl Wisdom