I'm unaware of any
Perl mail program, but I do have one suggestion for you: Make a copy of your mailbox (preferrably saving a copy to backup as well), and use the copy instead of the real thing, either for testing, or for developing your own Perl program to read it.
That way, you won't corrupt the original, and you can always restore from backup if you destroy the working copy.
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/