in reply to extract attachment from email again

You opened the file in text mode, but you want to save binary data, so you have to open it in raw mode instead. Binary data written in text mode "cooks" the newlines.
use autodie qw(:all); . . . for my $i (1 .. $pop->Count) { open my $fh, '>:raw', "msg-$i.msg"; $pop->HeadAndBodyToFile($fh, $i); close $fh; }

Replies are listed 'Best First'.
Re^2: extract attachment from email again
by stanislavovi4 (Initiate) on Feb 27, 2012 at 19:59 UTC
    It works. Thanks a lot.