Re: removing line feeds

2006-01-21 Thread Tom Phoenix
On 1/21/06, Bowen, Bruce <[EMAIL PROTECTED]> wrote: > I know how to get rid of the carriage returns using s/\n//g, but > haven't had any luck in finding the way to get rid of the line feeds > following the |fs. Have you tried using a substitution? A line feed is often the character "\x0A", in cas

Re: removing line feeds

2006-01-21 Thread Xavier Noria
On Jan 21, 2006, at 21:43, Bowen, Bruce wrote: Perhaps that file has mixed newline conventions? Does $entire_file_content =~ tr/\015\012//d; do what you need? -- fxn That did not work. I've looked into the file with a hex editor it that's telling me there's a hex 0D 0A 0D 0A after ea

Re: removing line feeds

2006-01-21 Thread Xavier Noria
On Jan 21, 2006, at 17:28, Bowen, Bruce wrote: I have files with this format text text |fs text text text |fs The goal here is to make this data into a flat file of continuous text (including the |fs).texttext|fstexttexttext|fs I know how to get rid of the carriage returns using s/\n/

Re: removing line feeds

2006-01-21 Thread Shawn Corey
Bowen, Bruce wrote: I know how to get rid of the carriage returns using s/\n//g, > but haven't had any luck in finding the way to get rid > of the line feeds following the |fs. Sorry, \n means a line feed. Try: s/\n//g; # Remove line feeds s/\r//g; # Remove carriage returns See: perldoc p