cleaner
changeset 7 a508df65c738
parent 6 129b39480dc5
equal deleted inserted replaced
6:129b39480dc5 7:a508df65c738
    54     if ($o{check}) {
    54     if ($o{check}) {
    55 	my $total = scalar keys %inuse;
    55 	my $total = scalar keys %inuse;
    56 	my $done = 0;
    56 	my $done = 0;
    57 	local $SIG{ALRM} = sub {
    57 	local $SIG{ALRM} = sub {
    58 	    say sprintf "done %5.1f%% (%*d of $total)" 
    58 	    say sprintf "done %5.1f%% (%*d of $total)" 
    59 		=> 100 * $done/$total, length($total), $done;
    59 		=> 100 * $done/$total, length($total), $done
       
    60 		if $total;
    60 	    alarm 5;
    61 	    alarm 5;
    61 	};
    62 	};
    62 	$SIG{ALRM}->();
    63 	$SIG{ALRM}->();
    63 	while (my ($f, $i) = each %inuse) {
    64 	while (my ($f, $i) = each %inuse) {
    64 	    ++$done;
    65 	    ++$done;