Kevin Zembower wrote at Mon, 29 Jul 2002 17:19:46 +0200: > I'm facing what I believe to one of the classic text manipulation problems, >transforming a > document which was typed with a hard return at the end of every physical line, and >two consecutive > newlines to mark the end of a paragraph. > > Would anyone help me write a program which would transform these documents? I'm >trying to find all > instances of a single newline, and remove it, either inserting or removing space >characters around > where it was to leave just one space between what was the two lines. I also need to >substitute a > single newline for two or more consecutive newlines, whether or not they're >separated by > whitespace characters. > > I tried looking this up in Perl Cookbook, ch. 6.6, Matching multiple lines, but >couldn't figure it > out. I couldn't find a module in CPAN that looked like it would work. I couldn't >find a way to > search the archives of this group, where I bet it's been mentioned before.
You should have a look to Text::Autoformat Cheerio, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]