in reply to Replace new line char with br

just another way to do it...

$post=~s/.$/<BR>/g;

MP

Replies are listed 'Best First'.
Re (tilly) 2: Replace new line char with br
by tilly (Archbishop) on Aug 19, 2001 at 13:02 UTC
    Considering that $ can match before or after a newline, and a regular expression will match the first place in a string that it can, this will replace the last character before the newline with the tag. Which isn't what you wanted to do...
      of course you're right.... copy and paste are sometimes not your friends.....

      MP