in reply to
converting carriage returns to <br> tags (was: Simple Question for you guys)
This node falls below the community's threshold of quality. You may see it by logging in.
Comment on
Re: Simple Question for you guys.
Select
or
Download
Code
Replies are listed 'Best First'.
Re: Re: Simple Question for you guys.
by
Sifmole
(Chaplain)
on May 18, 2001 at 17:28 UTC
No it won't. The tr/// operator works on individual characters. You would likely want to use an s///.
The
tr/\n/<BR>/s;
will actually translate all newlines into '<'.. not quite what the asker wanted I am sure.
[reply]
[d/l]
In Section
Seekers of Perl Wisdom