my $last_index = $#locations; #### my ($chr, $pos) = (split ' ', $locations[$indexes[$rand_index]])[0, 1];