Parent directory specifications are stripped from the template itself. Given a template, returns a filehandle to the temporary file and the name of the file. The trailing X's are replaced with unique alphanumeric combinations. Returns just the filehandle alone when called in scalar context. The template must end in X's that are replaced by the routine.
Returns undef on failure.
Directory must be removed by the caller. The only check is that the file does not already exist, but there is no guarantee that that condition will continue to apply. In scalar context, returns the filehandle of a temporary file. No access to the filename is provided. If the temporary file can not be created undef is returned.