|
Posted by Richard A. Melia on August 23, 2005, 3:47 pm
Please log in for more thread options
Rob:
Many thanks - your solution did the trick.
It was so obvious I don't know how I missed it, too focused I guess.
Thanks again,
Richard
>
>> I am using MIME::Lite to send an e-mail with a file attachment.
>> Everything works well except for the body of the message.
>> I am using Type => 'TEXT' and Data => $comment
>> Where $comment has embedded carriage-returns (\n).
>> When the message arrives, it is one long string displaying all the \n's
> that
>> were embedded.
>> Can anyone tell me what to do to fix this problem?
>
> The following fits your description:
>
> use warnings;
> $comment1 = "This is a comment.\nIt is intended to appear over 2 lines\n";
> $comment2 = 'This is a comment.\nIt is intended to appear over 2 lines\n';
> print $comment1, "\n", $comment2, "\n";
> __END__
>
> The solution in this case is (obviously) to assign in *double* quotes, not
> in *single* quotes.
>
> Cheers,
> Rob
>
>
|