This isn't actually an answer to your question, just a suggestion. Have you looked at
IPC::Open3? Using that you wouldn't have to just through so many hoops to get the output of Spamassassin, not to mention avoiding temp files. Just a thought.
- Ant
- Some of my
best work - (1 2 3)