New Novice has asked for the wisdom of the Perl Monks concerning the following question:
I am writing a program that extracts information from websites. As the websites all use the same format, I use a loop to extract the information I am interested in. For some documents, I get the error message
substr outside of string at extract.pl line 187 use of uninitialized value in string eq at extract.pl line 182 use of uninitialized value in concenation (.) at extract.pl line 185 use of uninitialized value in concenation (.) at extract.pl line 185
This message is then repeated endlessly (presumably because of the loop?). What causes the "substr outside of string" warning?
Here is the code the message is referring to, the first line is number 178:
if ($content_sub2=~'Rapporteur') { $ch=substr($', $ch_count, 1); my $ch_count2=0; while ($ch_count2<2) { if ($ch eq" ") { $ch_count2++; } $d_ep_rap=$d_ep_rap.$ch; $ch_count++; $ch=substr($', $ch_count, 1); } }
Thank you
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Substr warning
by davido (Cardinal) on Sep 24, 2004 at 14:58 UTC | |
by Anonymous Monk on Sep 27, 2004 at 11:07 UTC | |
|
Re: Substr warning
by JediWizard (Deacon) on Sep 24, 2004 at 14:36 UTC | |
|
Re: Substr warning
by Happy-the-monk (Canon) on Sep 24, 2004 at 14:09 UTC | |
by Anonymous Monk on Sep 24, 2004 at 14:16 UTC | |
by bart (Canon) on Sep 25, 2004 at 00:33 UTC | |
|
Re: Substr warning
by TrekNoid (Pilgrim) on Sep 24, 2004 at 15:21 UTC | |
|
Re: Substr warning
by Jenda (Abbot) on Sep 24, 2004 at 14:55 UTC | |
by Anonymous Monk on Sep 27, 2004 at 11:05 UTC | |
by Jenda (Abbot) on Sep 27, 2004 at 13:45 UTC |