in reply to Re: Problem with a new line
in thread Problem with a new line

if you try it on the server i am running on you will get the hang of what i am trying to say, as long as the data is submitted as a single line in the textarea it prints out fine with the '_' break in between but as soon as you enter the text in 2 lines or more it adds '_' breaks in between every entry in the text area. Please feel free to try it your self on http://guestbook.ds5403.dedicated.turbodns.co.uk/index.html thanks for you advice though it was a real help

Replies are listed 'Best First'.
Re^3: Problem with a new line
by starX (Chaplain) on Aug 06, 2008 at 20:32 UTC
    Aha. If that's the case, there are a couple things to try. First, stick a WRAP=SOFT within the opening TEXTAREA tag. Second, as I suggested before, use a regex to filter out those new lines. Super simplistic example:
    my $string = "this is \n a string with \n internal newlines."; $string =~ s/\n//g;