Are you only printing this to a screen or to a file? Is it possible these files contain \r or \b characters? What if you added s/\s/ /g; after you chomp?
How should I handle RTF without using a module?
The only reliable way to do so is to read the (competing) specifications, experiment a lot, build up a comprehensive test suite, and consider some form of prayer and fasting. If the whitespace experiment doesn't fix things, you're probably much better off using a module.
Improve your skills with Modern Perl: the free book.
In reply to Re: Parsing an RTF File as plain text.
by chromatic
in thread Parsing an RTF File as plain text.
by Ekimino
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |