You mean lines of text seperated by an empty line, you could do something like this to read a file by paragraph:
{ # create an extra scope local $/ = ""; # set record seperator to empty lines while (<INPUT>) { # $_ contains a paragraph of text from <INPUT> } } # $/ is restored to its original value
Note that this code will tread more than one blank line as a single separator. See also the section $INPUT_RECORD_SEPARATOR in perlvar.
In reply to Re: matching paragraphs
by Joost
in thread matching paragraphs
by imhotep
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |