in reply to Printing an array in a Here Doc

$body1 = join ("\n", @OutputDetails);
see map or join

jdtoronto