This is a very generic question, much more detail would be needed
to give a specific answer.
Certainly you can have a Perl program examine your email. But
it depends on many things, like:
- Where and how is your email stored? In a local mail spool?
On a remote POP or IMAP server?
- When and how you want the Perl program to execute. When
each individual message arives? Periodically, processing all
the pending messages in batch?
- What is it that you want to do with each message. Rewrite
it in some form? Write results to other files? Execute commands?
As you can see, there are many unknowns in your question.
Almost everything is possible with Perl, but you will have to
be more specific if you want more detailed help.
--ZZamboni