On Fri, Oct 26, 2012 at 8:16 PM, Unknown User <[email protected]> wrote: > I have code that goes something like this: > > > my $start = time(); > my $delay = 60; > ... > > while (my $line = <$fh>) { > my $err; > ... > ... > my $timenow = time(); > if ( $timenow - $start >= $delay ) { > $start = $t; err, that would be: $start = $timenow; > dumpstats($err); > $err = {}; > } > } > ... > > I wonder if it would be possible to replace this loop with a handler > based on alarm. > If it is possible, which would be more efficient? > > Thanks
-- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
