open my $log, '>', $logfile or die "Failed to create $logfile: $!\n"; #### for (my $round = 1; $round <= $roundlimit; $round++) { #### for my $round (1 .. $roundlimit) { #### if ($hitcount == 0) { print $log "Hitcount: $hitcount through Round $round ==> STOP\n"; last; }