What about good ol' line by line processing?
use strict; use warnings; use Data::Dumper; my $t = q{ Subject: Hi there Content-Type: text/plain; format=flowed; charset="iso-1189-1"; Return-Path: <example@example.org> }; my @fields; for ( split /\n/, $t ) { push @fields, $_ and next if /^\S+:/; $fields[-1] .= $1 if /\s*(.+)/; } print Dumper \@fields;
In reply to Re: Splitting folded MIME headers into indivual headers?
by hdb
in thread Splitting folded MIME headers into indivual headers?
by sebastiannielsen2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |