J
John W. Krahn
Mike said:When I do that, the output I get is:
ARRAY(0x15f1a0c)
That is because $nntp->article returns a reference to an array. You
have to dereference the array to access its contents.
^^^^My exact code snippet is:
my $text = $nntp->article;
$text =~ tr/\n/<br>/;
You can't use tr/// on strings. That will replace all "\n" characters
with the '<' character. The characters 'b', 'r' and '>' will be
ignored.
# also tried using:
# my @body =~ split(/\n/, $text);
print "$text";
s/\n/<br>/ for @$text;
print @$text;
John