in reply to Re: WWW-LEO, why is my code "crashing"
in thread WWW-LEO, why is my code "crashing"

as you can see from the data ive posted the english words use only a-z. most from the code is from WWW-LEO docs.
using just the word ive posted the error changes to:
Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 221, <INFO> line 32. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 218, <INFO> line 32. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 221, <INFO> line 32. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 218, <INFO> line 32. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.6/WWW/LEO.pm line 221, <INFO> line 32.

line 32 is the last line from the file...same with the 370.

Replies are listed 'Best First'.
Re^3: WWW-LEO, why is my code "crashing"
by metalfan (Novice) on Dec 31, 2005 at 10:48 UTC
    heres the complete code with the file for my input:
    #!/usr/bin/perl use warnings; use strict; use diagnostics; use WWW::LEO; use Data::Dumper; open(INFO, "< /home/metalfan/todo/dictionaries/Vokabeln\ -\ absolut +ion\ gap.csv.test") || die("can't open datafile: $!"); #my @file=<INFO>; #for my $entry (@file) foreach my $entry (<INFO>) #for my $entry ($file[10]..$file[15]) { my $n=0; if ($entry =~ m/"(.+)",\s/x) { if ($entry =~ m/Baggage/) { exit; } my $vokabel=$1; #print "$1\n"; my $leo = WWW::LEO->new; #$leo->query("@ARGV"); $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; } } }
    the input file:
    http://rapidshare.de/files/10146384/Vokabeln_-_absolution_gap.csv.test.html

    it's still "crashing". mostly every third run didnt succeed...
    what could that be?
      CLOSED switched to html format for my input