in reply to Re: Issue with time() in loop?
in thread Issue with time() in loop?

Tanktalus is most likely right. If you are not sure how often and how much data will be sent to your thread, you should really do something like

use IO::Select; my $s = IO::Select->new(); $s->add(\*FILE); my @ready = $s->can_read(1800); # 60*30 seconds = 30 minutes foreach (@ready) { # read your handle }
Updated: Thanks to Tanktalus for pointing out a few typos.