if ($length <= ++$pos){ close (PERMUTEOUT) ||die "Could not close $permutelist_filename: $!"; return ($permutelist_filename); }