my($tmpfh, $tmpfile) = File::Temp::tempfile(UNLINK => 1); File::Copy::copy($file, $tmpfile);