Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Any help on this poser would be most appreciated

I am trying to use Mail::Internet to split an inbound email on STDIN into it's body and header parts so I can store what I need in a database.

I can deal with the header no probs but the body part is driving me up the wall, even though the documentation makes it sound simple.

The 'body' method should be a reference to an array containing the lines of the message body. Here is a sub I knocked up to parse the message.

sub parse_message { $message = new Mail::Internet \*STDIN; $sender = $message->head->get("From"); @content = $message->body(); $content = join('\n',@content); }

All I get in $content or @content is something like ARRAY(0x8217224);

I know I'm probably overlooking something very basic here, can anybody help?

Many thanks