in reply to Re: Strange crash - any ideas?
in thread Strange crash - any ideas?

This seems to have resolved the problem. Changing the for loop so that it had:
for $ticker (@algTickers){ #use $ticker for anything for this spot in the array }
instead of
for(@algTickers){ #use $_ into a var and then use that var for this spot in the array }
This must have been something I missed as I was learning about "$_" out of a for loop - I must have only used it in straight loops and not nested loops up until now. Checked the camel book and in the foreach section it does say that each $_ is a reference, which I knew, but I don't see any code there that is clearing out that spot in the array... not sure why it was doing it, but this seems to have resolved the issue and then the ensuing side effects.

Now I need to uncomment a lot of lines now to confirm that this fixes the issue.

There are some odd things afoot now, in the Villa Straylight.

Replies are listed 'Best First'.
Re: Re: Re: Strange crash - any ideas?
by Roger (Parson) on Oct 20, 2003 at 03:08 UTC
    Add the following to the top of your perl script:
    use strict; use Data::Dumper;
    And then add print Dumper(\@algTickers); before and after your for loop, as this will inspect your array and see what has been changed.