Perl: the Markov chain saw | |
PerlMonks |
Detachments II: The Sequelby hacker (Priest) |
on Nov 09, 2003 at 20:57 UTC ( [id://305713]=perlquestion: print w/replies, xml ) | Need Help?? |
hacker has asked for the wisdom of the Perl Monks concerning the following question:
I decided to pick up a script I wrote awhile ago, and get it back on track. I wrote a little about it in Dealing with "Detachments". Here's the issue:
The script is an alias in /etc/mail/aliases, so that incoming mail sent to this address, is sent to my script and processed. Originally, the script required that the key=value pairs in this script had to occur in the body of the message itself, in a template I parse with Config::General. I've added the capability to attach the template to the message itself as an attachment (easier for Outlook/Windows users, apparently). So far, so good. What I'm trying to do now, is "detach" that attachment, store it in a scalar I can manipulate (or even write it to disk, for the moment. I can deal with IO::Scalar on it later to omit the disk hit). When I detach the file, using MIME::Parser, I have a few options, each with their own confusing quirks:
The code I'm using looks like this:
What I'd like, ideally, is to have the attachment "detached", and named as "$md5file-originalfile.extension", so I can then manipulate it and handle it as a normal file or file-handle-in-a-scalar.
Color me confusigated.
Back to
Seekers of Perl Wisdom
|
|