In that case, I'd use:
@fixedheaders = split /\n\b/, $fixedmsgheader;Update: checked my work with a test program:
cat splitest.pl #!/usr/bin/env perl use strict; use warnings; my $t = q{ Subject: Hi there Content-Type: text/plain; format=flowed; charset="iso-1189-1"; Return-Path: <example@example.org> }; my @fields = split /\n\b/, $t; print join("\n***\n", @fields), "\n"; localadmins-MacBook-Pro-2:~ [mmason] $ perl splitest.pl *** Subject: Hi there *** Content-Type: text/plain; format=flowed; charset="iso-1189-1"; *** Return-Path: <example@example.org>
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^3: Splitting folded MIME headers into indivual headers?
by roboticus
in thread Splitting folded MIME headers into indivual headers?
by sebastiannielsen2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |