Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with the newline characters

Status
Not open for further replies.

thendal

Programmer
Aug 23, 2000
284
I have a form where users enters the data and collected in a textfile and I have to output the particular data according to the user requests.

My problem is

Iam saving in the text file like

DATA1|DATA1|DATA FROM THE TEXTAREA

when a newline is entered with the data in the textarea field my data get stored like this

DATA2|DATA2|DATA FROM
the textarea

how to get away this problem.

advise me.
 
first lose any \n character on the end of the line

chomp;

and then delete any embedded \n chars like this, I think

s/\n//gs;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top