in reply to Re^2: Extract Paragraph From Text
in thread Extract Paragraph From Text
In the code posted, the record separator ($/) is set to "". The paragraphs are separated by a blank line, i.e. a line containing no characters between its start and end. The code works as posted.
If you are using the same code and your result is a single block of text, then the paragraphs are not separated by empty lines, on your test setup.
Are you testing with the exact code you posted here? Or is the input data in a file, and you copied it into your code to post here? What happens if you copy and run the code from your OP, using copy/paste from the raw ("download") link?
Bottom line: the text you are processing must have its paragraphs separated by something other than a blank line.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Extract Paragraph From Text
by perlbeginneraaa (Novice) on Sep 08, 2015 at 15:37 UTC | |
by 1nickt (Canon) on Sep 08, 2015 at 15:50 UTC |