my $outfile = "a"; my $fh; $outfile++ until sysopen $fh, $outfile, O_WRONLY|O_CREAT|O_EXCL;