in reply to HTML Email Help!
If it is necessary to interpolate directly into a double-quoted string, use this:my $text_to_interpolate = ''; for my $i (0 .. $#system_names) { my ($color_0, $color_1) = ('#a1a1a1', '#f3f3f3'); $rowcolor = $i % 2 ? $color_1 : $color_0; $text_to_interpolate .= qq{ <tr bgcolor="$rowcolor"> <td width=""> $system_names[$i] </td> <td width=""> $name_names [$i] </td> <td width=""> $menu_names [$i] </td> <td width=""> $option_names[$i] </td> <td width=""> $system_names[$i] </td> <td width=""> Received </td> </tr> }; } ... Data => qq| <table width ...> $text_to_interpolate ... |, ...
Note the "string @{[ code ]} string" idiom.my $string = "before @{[ code() . "stuff" ]} after";
|
|---|