my $files_to_remove = "The following files will be removed from your account if they exist: \n" . join(", ", @files_to_remove); print < function details() { alert("$files_to_remove"); } .... [Details] .... END