drieux wrote: > but if you wanted to 'clean em all' > > $line =~ s/[$eol]+/\n/g > > would find the case of > > \r > \r\n > \n > \r\n\n > .... > > and replace them all with a single '\n' for all > occurances in the $line that one is going through....
wouldn't this regex work: while (<FILE>) { s/\s+$/\n/g; } without having to do all the checking to see if it's a \r or \n or whatever, just say 'replace any whitespace that occurs at the end of the line with a newline character'. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]