This patch is not complete. An additional discipline is needed to unlink on close(). But at least it improves things w.r.t. using mkstemp() on "/tmp/foo": files are created in a suitable directory, and their number is not restricted to 26. Thanks, Ilya --- ./perlio.c-pre Sat Sep 13 10:26:32 2003 +++ ./perlio.c Sat Sep 20 00:07:48 2003 @@ -4861,7 +4861,7 @@ PerlIO_tmpfile(void) if (fd >= 0) f = PerlIO_fdopen(fd, "w+b"); #else /* WIN32 */ -# ifdef HAS_MKSTEMP +# if defined(HAS_MKSTEMP) && !defined(OS2) SV *sv = newSVpv("/tmp/PerlIO_XXXXXX", 0); /*Thread Next