Filtering the input from a transmitet form

[email protected] (Eelco Alosery) Fri, 10 Jan 2003 19:05:07 +0100
Newsgroups perl.macperl.webcgi
Message-ID <[email protected]>
--Apple-Mail-4--509801759
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

I have a problem when I reseave a transmitet form and want to writh it 
to a data base.
All the reseaved info must by written to a single line, but somtimes it 
starts writing multiple lines.
This happens when there has giffen a enter for a new line in the 
textfield on the form.
How do I filter al enters to the the foloing text: <br>
I als want to filter multiple whithe spaces to a single white space and 
i want to filter out white spaces at the start end the end of the 
reseaved text.
My problem usely happens when a text is copy't from a word file for 
accample.

So I mean what is the best code to filter a reseaved text to writh it 
to 1 line in a data base


Thanks, Eelco Alosery
--Apple-Mail-4--509801759--