Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Strange crash - any ideas?by AssFace (Pilgrim) |
on Oct 20, 2003 at 02:25 UTC ( [id://300459]=note: print w/replies, xml ) | Need Help?? |
Here is a larger code example - the array @testDateRows has the series of dates that I will be testing - in this case close to a thousand days.
The array @algTickers has all of the names of the data files that will be looked at - several thousand are in there. When I set it to close after it runs once (tmpCounter > 0), then it works great that one time. It will output all the tickers quickly and it doesn't complain. When I set the tmpCounter to 1, as it is below, meaning that it runs through the outer loop twice, then I see issues in there for every single spot. I get the error "Use of uninitialized value in concatenation (.) or string at" some line number in the thing. (it refers to the line number where the open is trying to take place) This would make me think that since the names are derived from pulling out the filenames of a directory, then the "." and ".." snuck into the array. But I have accounted for their removal in the code that populates that array, and I have output that array to a file to look at the data and it is all correct. What is wrong with the code below that would allow it to work perfectly one time through the loop, and then the next time through the loop (and every time after that) fail? I also haven't figured out why at some point it will also clear the screen out - at this level of iteration it doesn't do it, but it will if I get rid of the if statement that will exit.
------------------------------------------------------------------- There are some odd things afoot now, in the Villa Straylight.
In Section
Seekers of Perl Wisdom
|
|