my $switch = 1; while ($switch == 1) { open (CG, "/Users/logancurtis-whitchurch/Dropbox/thesis_folder/CompleteGenomics/28_males_inAll/CGS.inall.28.chr.23.txt") or die "can't open CG file\n"; my $output_file = "/Users/logancurtis-whitchurch/Desktop/temp_$count.txt"; open(OUT, ">$output_file");