Re: retaining newline characters when writing to file

2006-06-06 Thread John Salerno
Fredrik Lundh wrote: > John Salerno wrote: > >> If I read a string that contains a newline character(s) into a >> variable, then write that variable to a file, how can I retain those >> newline characters so that the string remains on one line rather than >> spans multiple lines? > > you canno

Re: retaining newline characters when writing to file

2006-06-06 Thread Fredrik Lundh
John Salerno wrote: > If I read a string that contains a newline character(s) into a variable, > then write that variable to a file, how can I retain those newline > characters so that the string remains on one line rather than spans > multiple lines? you cannot: the whole point of a newline c

retaining newline characters when writing to file

2006-06-06 Thread John Salerno
If I read a string that contains a newline character(s) into a variable, then write that variable to a file, how can I retain those newline characters so that the string remains on one line rather than spans multiple lines? Example: In a CGI script, I'm reading the address field from an HTML f