in reply to Joining an array within a text block

Thanks for you help again. Here is the solution I came up with

sub mail { my ($changed,$updated) = @_; my $t = Template->new; my $to = 'xxx@xxx.com'; my $subject = "Webchanges Detected - $date"; my $body = <<EOF; <html> <body> <h2>Changes Detected :</h2> <hr width="80%" size="1"/> <br/> <b>Changed Values :</b> <ul>[% FOR changed IN list1 %] <li>[% changed %]</li>[% END %] </ul> <br/> <hr width="80%" size="1"/> <br/> <b>Updated Values :</b> <ul>[% FOR updated IN list2 %] <li>[% updated %]</li>[% END %] </ul> </body> </html> EOF $t->process(\$body, { list1 => \@{$changed}, list2 => \@{$updated} + }, \*STDOUT); my $msg = MIME::Lite->new( From => 'xxx@xxx.com', To => $to, Subject => $subject, Type => 'text/html', Data => $body, ) or die "Error creating multipart container: $!\n"; $msg->send or die "Failed To Send!: $!\n"; print "Message sent!\n"; }

Well with out the template printing to standard out