$fn = "filename_20020723141223_"; my $c = 1; do { $fn .= "$c"; $c++; } until sysopen(FH, $fn, O_RDWR | O_CREAT | O_EXCL, 0600); # now do I/O using $fh handle...