Gossamer Forum
Home : Products : Gossamer Links : Discussions :

GT::Mail parse method and filehandles

Quote Reply
GT::Mail parse method and filehandles
Hi,

I'm using

Code:

my $mail = new GT::Mail;
my $main_p = $mail->parse ($fh);


to parse the contents of a file into the mail object, it works fine and I can work with it without problems, the thing is that the mails I want to parse are NOT contained in a filehandle, but an arrayref, which is the data returned from a module I'm using.

The module I refer to is Net::NNTP, it returns header and articles info in an arrayref, how would be the best way to convert the arrayref to a filehandle without actually writing a file and then reading it?

Thanks,