metalfan has asked for the wisdom of the Perl Monks concerning the following question:
i wasn't able to figure out on which word it crashes, seems to differUse of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 218, <INFO> line 370. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 221, <INFO> line 370. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 218, <INFO> line 370. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 221, <INFO> line 370. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 218, <INFO> line 370. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 221, <INFO> line 370.
theres another WWW-LEO version on cpan in the bugreports section#!/usr/bin/perl use warnings; use strict; use WWW::LEO; use Data::Dumper; open(INFO, "< /home/metalfan/todo/dictionaries/Vokabeln\ -\ absolut +ion\ gap.csv") || die("can't open datafile: $!"); my @file=<INFO>; for my $entry (@file) { my $n=0; if ($entry =~ m/"(.+)",\s/x) { my $vokabel=$1; my $leo = WWW::LEO->new; $leo->query("$vokabel"); if ($leo->num_results) { my $i; foreach my $resultpair (@{$leo->en_de}) { printf "%3d: %-40s %s\n", ++$i, @$resultpair; } } else { print "Sorry, your query for ’%s’gave no results.\n", $leo +->query; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW-LEO, why is my code "crashing"
by Corion (Patriarch) on Dec 29, 2005 at 19:00 UTC | |
by metalfan (Novice) on Dec 29, 2005 at 20:34 UTC | |
by Corion (Patriarch) on Dec 29, 2005 at 20:48 UTC | |
by metalfan (Novice) on Dec 29, 2005 at 20:56 UTC | |
by metalfan (Novice) on Dec 29, 2005 at 19:26 UTC | |
|
Re: WWW-LEO, why is my code "crashing"
by ptum (Priest) on Dec 29, 2005 at 19:19 UTC | |
by metalfan (Novice) on Dec 29, 2005 at 20:10 UTC | |
by metalfan (Novice) on Dec 31, 2005 at 10:48 UTC | |
by metalfan (Novice) on Jan 09, 2006 at 14:23 UTC |