How can I read in a file by paragraphs?
Use the
$\
variable (see
the perlvar manpage
for details). You can either set it to
""
to eliminate empty paragraphs (
"abc\n\n\n\ndef"
, for instance, gets treated as two paragraphs and not three), or
"\n\n"
to accept empty paragraphs.
Back to
How do I print to more than one file at once?
Forward to
How can I read a single character from a file? from the keyboard?
Up to
the perlfaq5 manpage