imhotep has asked for the wisdom of the Perl Monks concerning the following question:
print "<html para element> $variable </html para element>";
If so is changing the pattern match done like this?
open INPUT, "<input.txt"; undef $/; $content = <INPUT>#The variable, input in this case being #standard in +put close INPUT; $/ = "\n";#Restore for normal behaviour later on
Or have got it completely wrong? I think that this will read in the whole file and not just paragraphs of text. Alternatively as the paragraphs in the text are surrounded by blank lines, could place each paragraph in a variable by searching for a chunk of text sandwiched between 1 or more blank lines.
Updated Steve_p - added code tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: matching paragraphs
by deibyz (Hermit) on Apr 18, 2005 at 14:34 UTC | |
by imhotep (Novice) on Apr 18, 2005 at 20:13 UTC | |
by starbolin (Hermit) on Apr 19, 2005 at 05:57 UTC | |
|
Re: matching paragraphs
by Limbic~Region (Chancellor) on Apr 18, 2005 at 14:24 UTC | |
|
Re: matching paragraphs
by Joost (Canon) on Apr 18, 2005 at 14:34 UTC |