in reply to Upload a file temporarily

If you are useing CGI to get your parameters, which I hope you are, try the tmpFileName method of CGI. I have done the same thing but I used Mail::Sender.