nobilis has asked for the wisdom of the Perl Monks concerning the following question:
I'm a young and inexperienced soul who has been trying to get to grips with the language of perl for just a year now and in particular I'm trying to extract attachments from incoming mails using MIME:Tools.
I have no problem getting the contents of the message but when I call the following:
$message = $parser->parse_data($msg); # where $msg has already the email contents
I get
Undefined subroutine utf8::SWASHGET called at ./mime/MIME/Parser/Filer.pm line 364
This happens to be the first instance of regex matching in the Filer.pm file, so I'm assuming it's something to do with the way to regex matching is performed.I put a regex match earlier just to see if it is indeed related to that and it failed on that exact spot with the same error.
My perl version is 5.8.9, MIME::Tools - 5.502, I'm not a root user and sadly have no access to root privileges (I'm getting around this by using
BEGIN { unshift @INC, "~email/mime"; }
at the top where /mime contains all the lib folders from the relevant CPAN modules, in this case MIME)
Thanks very much in advance!
P.S. I've posted this question on stackoverflow as well, as I felt that perl monks and SO have sufficiently different audiences, should it get answered in either one of the websites, I'll update both posts with the answer for future reference
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting utf8::SWASHGET when using MIME::Tools
by tobyink (Canon) on Jun 05, 2012 at 12:21 UTC | |
by nobilis (Initiate) on Jun 05, 2012 at 13:35 UTC | |
by MidLifeXis (Monsignor) on Jun 05, 2012 at 13:47 UTC | |
by nobilis (Initiate) on Jun 05, 2012 at 15:16 UTC |