i need to convert a perl array to a single string variable, containing all array items separated with newlines.
my $content = "";
@names=('A','C','C','D','E');
$content = $content . join($", @names) . "\n";
print $content;
I intend the output to be like:
A
C
C
D
E
But i get:
A C C D E
Why isn't the newline \n character being honoured?