In article <[EMAIL PROTECTED]> wrote "Chris Zampese"
<[EMAIL PROTECTED]>:
> Hi All,
> I have a file that contains the contents of an email. Its format is shown below...
>
> (Lots of lines of random stuff)
> Content-Transfer-Encoding: quoted-printable
>
> The message of the email is here then it is followed by
>
> ------=_NextPart_000_0118_01C1B358.DE107900
> (lots more lines of stuff)
>
> how would I get just the message into a variable (or array or whatever) so that I
>can use it?
One way could be to read the file until the nextpart-statement comes.
The snippet would read like:
my @email;
open EMAIL, "<filename" or die "Cannot open filename: $!";
while (<EMAIL>) {
last if /NextPart/;
push @email, $_;
}
close EMAIL;
Now, @email contains all lines before.
Best Wishes,
Andrea
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]