in reply to Parsing a Unix Mbox

use MIME::Parser; use Mail::Util qw( read_mbox ); my @messages = read_mbox('filename'); my @parsed_messages = map {(new MIME::Parser)->parse($$_)} @messages;


T I M T O W T D I

Replies are listed 'Best First'.
Re^2: Parsing a Unix Mbox
by Anonymous Monk on Mar 25, 2018 at 23:31 UTC
    Can you please tell me why the above doesnt work with perl 5.18?.. I am trying to understand how to resolve error on the last line: Not a SCALAR reference at ..
      After RTFM , it looks both modules are deprecated and broken.. read_mbox: This method does not quote lines which accidently also start with the message seperater From: parse: DEPRECATED A ref to array of scalrs