in reply to Joining an array within a text block

With your heredoc implementation, it makes sense to have a separate array. However, with simple for/push constructs like this, map is appropriate:
my @new_array = map { "<li>$_</li>" } @existing_array;

I haven't used them, but there are templating systems for creating HTML.