You haven't exactly been clear on what you actually want to achieve. Maybe File::Find or just glob or readdir (with opendir) will help you? All of these will return you a list of files in (or below) a directory. Maybe, if you want to process all the files in a directory, that's what you want?
You can help us help you better by explaining what you want to achieve.
| [reply] |
what I want are the headers of an email logged in a txt file. the code where those stand are the email's themselfs. I want to put those emails in this program, get the headers: to, from, date, cc, subject and the filename of an possible attachment and print those in that txt file. but almost everything works already. the only thing that doesn't work is the loading of an email into my program in a way that it can be used first to get those headers and after that to get (if there are) the filenames of the attachments.
| [reply] |
From reading the Mail::Internet documentation, it seems to me that it doesn't support or handle attachments. For attachments, I guess you will want to use MIME::Parser or something from the Email namespace. These will give you both the body of the attachment(s) and the suggested filenames as well.
| [reply] |