File-Temp

File::Temp(3p) Perl Programmers Reference Guide File::Temp(3p)

File-Temp

File::Temp(3p) Perl Programmers Reference Guide File::Temp(3p) # File::Temp(3p) Perl Programmers Reference Guide File::Temp(3p) NNAAMMEE # File::Temp - return name and handle of a temporary file safely VVEERRSSIIOONN # version 0.2311 SSYYNNOOPPSSIISS # use File::Temp qw/ tempfile tempdir /; $fh = tempfile(); ($fh, $filename) = tempfile(); ($fh, $filename) = tempfile( $template, DIR => $dir); ($fh, $filename) = tempfile( $template, SUFFIX => '.dat'); ($fh, $filename) = tempfile( $template, TMPDIR => 1 ); binmode( $fh, ":utf8" ); $dir = tempdir( CLEANUP => 1 ); ($fh, $filename) = tempfile( DIR => $dir ); Object interface: require File::Temp; use File::Temp (); use File::Temp qw/ :seekable /; $fh = File::Temp->new(); $fname = $fh->filename; $fh = File::Temp->new(TEMPLATE => $template); $fname = $fh->filename; $tmp = File::Temp->new( UNLINK => 0, SUFFIX => '. ...