Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Close a file and reopen a new one at midnight

by 0day (Sexton)
on Jan 14, 2013 at 19:18 UTC ( #1013262=note: print w/ replies, xml ) Need Help??


in reply to Re: Close a file and reopen a new one at midnight
in thread Close a file and reopen a new one at midnight

my $timeout = 24*60*60 - ($hour*3600 + $min*60 + $sec); while(1) { eval { local $SIG{ALRM} = sub { die; }; alarm($timeout); while (my $line = <$sock>) { ................. } alarm(0); }; $timeout = 24*60*60; }


Comment on Re: Close a file and reopen a new one at midnight
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (20)
As of 2014-09-30 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (369 votes), past polls