open(IMAPSYNCOUTPUT,"$imapsynccommand|"); open(LOGFILE,">>$imapsynclog"); my $num = 1; while () { print LOGFILE "$_"; if ($num == 1) { print "."; $num++; } elsif ($num < 10) { $num++; } else { $num = 1; } }