in reply to Re: Paragraph break
in thread Paragraph break
Why does the script doesn't work. The expected output should be something similar as below#!/usr/bin/perl my $text; while (my $line = <DATA>){ $line =~ s/\\/<br>/; $text .= $line; } $text =~ s[<br>\s*<\/w*>][<\/w*>]s; print $text; __DATA__ <p> This affected me deeply because I was being treated for depression the +n. I felt she was replacing me as mother and grandmother.\ This scenario occurred as often as two to three times a week.\ Somehow, all of those present seemed to think I should be her "friend. +" Shouldn't I be allowed to choose whom I want to associate with? Now, add the fact that my sister and her husband are still very attached to my ex, as they should be.\ </p>
<p> <br>This affected me deeply because I was being treated for depression + then. I felt she was replacing me as mother and grandmother.<br> This scenario occurred as often as two to three times a week.<br> Somehow, all of those present seemed to think I should be her "friend. +" Shouldn't I be allowed to choose whom I want to associate with? Now, add the fact that my sister and her husband are still very attached to my ex, as they should be.<br/> </p>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Paragraph break
by ikegami (Patriarch) on Sep 02, 2009 at 06:39 UTC |