in reply to WWW-LEO, why is my code "crashing"
Your code is not "crashing", Perl just warns you about some events that you might not want. But if you look at your error message, you see two line numbers. One line is for WWW/LEO.pm - in line 218, a value is used that has not been initialized. The second line is for the INFO filehandle. It currently points to line number 370, likely because you have 370 vocables in your info file. If you change your code around a bit, Perl will tell you which word triggers these warnings:
Instead of
usemy @file = <INFO>; foreach my $entry (@file) { ... };
Then, the second line number will tell you the number of the word triggering the problematic behaviour. Of course, you could also output each word before looking it up via WWW::LEO:foreach my $entry (<INFO>) { ... };
foreach my $entry (@file) { chomp $entry; warn "Looking up '$entry'"; ... };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: WWW-LEO, why is my code "crashing"
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 | |
|
Re^2: WWW-LEO, why is my code "crashing"
by metalfan (Novice) on Dec 29, 2005 at 19:26 UTC |