> On Mon, 2004-05-03 at 10:46, Traeder, Philipp wrote: > > chomp might be the easiest (and probably fastest) solution. > > True :-) But the '\n' he was looking for was in the middle of the > sentence :-) > > BTW, I kept the trailing 'g' in the substitution just because I didn't > knew what the input text might be like... :-) >
You're right - I didn't read the original question closely enough. For the record: If you want to strip trailing newlines, use chomp. If you want to strip newlines anywhere else, use regexes. Monday before noon, and weÂve thoroughly messed up the answer to a completely clear question - thatÂs quite a good record, I'd say. ;-) Philipp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>