I recall that there is a way to tell Perl to not look at the new line character as the end of a record, so that the whole file could be globbed into one string for processing, then written back out easily. But I can't remember where I read that, or what it was called. Does anyone know what I'm talking about?Slurp. Read about the INPUT_RECORD_SEPARATOR variable: $/
Once you have your slurped input, if you need to output as paragraphs, Text::Wrap may be helpful.
Update: If you don't want to muck with $/, you could use the slurp function from File::Slurp.
In reply to Re: Can't remember the term to search for help on! (slurp)
by toolic
in thread Can't remember the term to search for help on!
by tom2112
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |