Subject: | Doesn't seem to work |
I downloaded several different files from www.gutenberg.org, including
http://www.gutenberg.org/files/22/old/roget15a.zip
and tried the module on it:
-----------------------
#!/home/ben/software/install/bin/perl
use warnings;
use strict;
use Parse::GutenbergRoget;
# These are the files of the Project Gutenberg edition of Roget's
thesaurus.
my $dir = '/home/ben/data/gutenberg-roget-thesaurus';
#my $file = "$dir/10681-body.txt";
#my $file = "$dir/22.txt";
my $file = "$dir/roget15a.txt";
my %section = parse_roget ($file);
print $section{1}[0][0]{text};
-------------------
It did not output anything except error messages:
-------------------
[ben@mikan] {08:55 57} tests 511 $ ./gutenberg-roget-thesaurus.pl
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 182, <$roget> line 17.
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 183, <$roget> line 17.
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 182, <$roget> line 18.
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 183, <$roget> line 18.
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 182, <$roget> line 19.
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 183, <$roget> line 19.
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 182, <$roget> line 20.
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 183, <$roget> line 20.
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 182, <$roget> line 55.
Use of uninitialized value $previous_section in hash element at
/home/ben/software/install/lib/perl5/site_perl/5.12.3/Parse/GutenbergRog
et.pm line 183, <$roget> line 55.
Use of uninitialized value in print at ./gutenberg-roget-thesaurus.pl
line 15.
[ben@mikan] {08:56 46} tests 512 $
--------------------
The return value seems to be an empty list.