develooper Front page | perl.libwww | Postings from August 2001

removing line breaks

Thread Next
From:
Sami
Date:
August 22, 2001 13:16
Subject:
removing line breaks
Message ID:
5.1.0.14.0.20010822164913.00acfec0@mail.traficon.fi

Greetings,


Probably an easy task for a more experienced programmer...

How do you remove line breaks from a TEXTAREA input
before writing the input to file? Example:

#$chars=param("chars");
#
#open (DATAFILE,">>/docs/data.txt");
#	print DATAFILE "\$chars";
#	print DATAFILE "\n";
#close (DATAFILE);

Now the line breaks user types into form's TEXTAREA
also break the lines of data.txt. So how do you cut
off the line breaks (and replace them with spaces)
so that TEXTAREA input always appears on single
line in data.txt?


Many thanks for help,

Sami


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About