c has asked for the wisdom of the Perl Monks concerning the following question:
I read through IO::File's description on CPAN and found the new_tmpfile however it left me somewhat confused. My goal is to write to a completely random file and then attach it to an outbound email using Mail::Sender. For example...
## create message with attachment $sender->MailFile({ to => "$username\@mycompany.inc", subject => "$subject", msg => "Attached is the info you need!", file => "$tmpfile", });
Try as I might using IO::File, attaching the tmp file is just not happening. Maybe I am trying to use the temporary file for purposes that it's really not meant for?
Perhaps its easier to state the reason I need the tmpfile. My script will parse several configuration files and return the information to user as a CSV file attached to an email. I'd like to write to a completely randomly named file so that a devious individual won't try any of the tricks of symlinking a known output file's name to some other file/area on the machine in the hopes of causing trouble. Make sense?
Any help is appreciated. Humbly -c
ps. thanks again ybiC for that original post. i find most of my answers simply by perusing your writeups...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Creating temporary files without File::Temp
by Sinister (Friar) on Feb 28, 2002 at 15:03 UTC | |
Re: Creating temporary files without File::Temp
by hatter (Pilgrim) on Feb 28, 2002 at 15:42 UTC | |
Re: Creating temporary files without File::Temp
by rob_au (Abbot) on Mar 01, 2002 at 02:42 UTC | |
Re: Creating temporary files without File::Temp
by perrin (Chancellor) on Feb 28, 2002 at 15:27 UTC | |
by c (Hermit) on Feb 28, 2002 at 16:02 UTC | |
by perrin (Chancellor) on Feb 28, 2002 at 16:04 UTC |