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
In reply to Substr warning by New Novice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |