in reply to ISO-8859-1 to plain text conversion

ISO-8859-1 is plain text. The problem is that the header data has been encoded in Base64, and encapsulated as per RFC 1522. The easiest way to undo it would probably be something like:

use MIME::Words qw(:all); $header = decode_mimewords($raw_header);