NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Similar to what I have (Score:1)
Nine is quite a bit more elaborate though. Notable differences:
so I don't get stuff inadvertantly overwritten. Also,
so I don't have to look at MIME types — that way only seemed to lead to madness. (What're you passing a parameter to
->filename()for btw?)Other reasons for its length include a folder processing mode, ability to read files passed to it on the command line, and more. I have it nearly PODded up and everything, too — should probably put it online somewhere. Not that it's a huge amount of work, but I like to make small but shiny tools. :-)
I have noticed that Perl gets all flustered if you try to throw excessively large folders at it, though. :-( It works very fine from my .procmail though. Email::MIME [cpan.org] is quite a fine module indeed, along with all the other nuggets the Perl Email Project turned out.
Reply to This
Re:Similar to what I have (Score:1)
Re:Similar to what I have (Score:2)
The docs say 'Normally it will return the filename from the headers, but if filename is passed a true parameter, it will generate an appropriate "stable" filename if one is not found in the MIME headers.' So it's a safety feature. It invents a filename if one isn't already given.
Re:Similar to what I have (Score:1)