my $tmpfh = File::Temp::tempfile(); File::Copy::copy($file, $tmpfh);