File::Temp

NAME

File::Temp

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"));

This module exports two routines:

  • tempfile

  • tempdir

AUTHOR

Jonathan Scott Duff <[email protected]>

File::Temp v0.0.10

Create temporary files & directories

Authors

  • Jonathan Scott Duff
  • Rod Taylor

License

Artistic-2.0

Dependencies

File::Directory::Tree

Test Dependencies

Provides

  • File::Temp

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.