XP is just a number | |
PerlMonks |
Re: How do I write data in SQLiteby GhodMode (Pilgrim) |
on Feb 04, 2006 at 00:00 UTC ( [id://527862]=note: print w/replies, xml ) | Need Help?? |
Since you know it's on the alert line, you know that the problematic variable is $_ (the current element of @links), or $text[$v]. You know it's not $a or $v because you set them explicitly before the loop starts. Use some print statements on separate lines for each of those variables to see what they contain. When you try to print the one that's uninitialized, you'll get the error message again and you'll know which one is causing the problem. What to do after you find the problematic variable depends on your needs. You could just initialize them all to "" at the beginning of the loop and that would make the error message go away, but you might not want any of those fields to be blank. Here's another method
||= says, for example: if ( ! $text[$v] ) { $text[$v] = "" }; -- -- GhodMode
In Section
Seekers of Perl Wisdom
|
|