Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple implementation of File::Temp for creating temporary files
branch: master

Merge pull request #2 from timo/master

fix generation of random file names
latest commit e7a5066021
Jonathan Scott Duff authored
Failed to load latest commit information.
lib/File fix generation of random file names
t s/eval/EVAL/g
META.info Use a scheme that build-project-list.pl can grok
META6.json Start following S22
README.md Add a README

README.md

File::Temp

Create temporary files. This module is loosely based on the Perl 5 module of the same name.

Synopsis

# Generate a temp file in a temp dir
my ($filename,$filehandle) = tempfile;

# specify a template for the filename
#  * are replaced with random characters
my ($filename,$filehandle) = tempfile("******");

# Automatically unlink files at end of program (this is the default)
my ($filename,$filehandle) = tempfile("******", :unlink);

# Specify the directory where the tempfile will be created
my ($filename,$filehandle) = tempfile(:tempdir("/path/to/my/dir"));

# don't unlink this one
my ($filename,$filehandle) = tempfile(:tempdir('.'), :!unlink);

# specify a prefix and suffix for the filename
my ($filename,$filehandle) = tempfile(:prefix('foo'), :suffix(".txt"));
Something went wrong with that request. Please try again.