#!/usr/bin/perl use Modern::Perl; use RTF::TEXT::Converter; my $string; my $object = RTF::TEXT::Converter->new(output => \$string); $object->parse_stream( "/home/wjw/tmp/RTF_test.rtf" ); chomp $string; my @string = split("\n", $string); foreach my $line (@string) { chomp $line; next if $line !~ /\w+/; next if $line =~ /^\_+\/\_+\/\_+$/; say $line; } #### Use of uninitialized value $cstylename in string ne at /home/wjw/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0/RTF/Control.pm line 1489, line 16. Document #: 000 Version #: 1 Document Owner: Someone Date of Last Update: 10/15/2013 Written by: Someone Status: Approved General Description Purpose Definitions Procedures Sign-Off Approvals Jane Doe, CEO Date John Doe, CFO Date #### cpanm RTF::TEXT::Converter --> Working on RTF::TEXT::Converter Fetching http://www.cpan.org/authors/id/S/SA/SARGIE/RTF-Parser-1.12.tar.gz ... OK Configuring RTF-Parser-1.12 ... OK ==> Found dependencies: RTF::Tokenizer --> Working on RTF::Tokenizer Fetching http://www.cpan.org/authors/id/S/SA/SARGIE/RTF-Tokenizer-1.18.tar.gz ... OK Configuring RTF-Tokenizer-1.18 ... OK Building and testing RTF-Tokenizer-1.18 ... OK Successfully installed RTF-Tokenizer-1.18 Building and testing RTF-Parser-1.12 ... OK Successfully installed RTF-Parser-1.12 2 distributions installed