in reply to MIME::Lite $message construction with variables

A) Variables in single quotes ('') are not interpolated. Replace with double quotes.

B) You can use the <<HEREDOC; syntax basically anywhere you want.

$x .= <<HEREDOC; stuff stuff bar HEREDOC

Replies are listed 'Best First'.
Re^2: MIME::Lite $message construction with variables
by hmbscully (Scribe) on Jun 10, 2004 at 22:18 UTC
    Many thanks, that seems to have solved my problem.
Re^2: MIME::Lite $message construction with variables
by Anonymous Monk on Aug 05, 2022 at 10:05 UTC
    Can you please share an example, i'm facing the same problem

      If you have the same problem, why doesn't the same solution help you?

      my $message = '... some message with $variable ...';

      This will never interpolate $variable. Use double quotes:

      my $message = "... some message with $variable ...";