in reply to Out of memory help

UnEdit: Hmm, maybe it IS -w clean...

You never reset $PART3 to 0, is that deliberate?

I don't see how that would make you hang, though.

Apart from that, I'm lost in a maze of AoAs :)

Oh, you are using @values in some spots, and @_ in others... Also not likely to hang you, but it is a bit odd...
--
Mike

Replies are listed 'Best First'.
Re: Re: Out of memory help
by RMGir (Prior) on Jul 19, 2002 at 19:15 UTC
    Hmmm, what version of perl are you running?

    My current perl doesn't have a problem with

    for (0..$#xdata) { push @frmt, [ $xdata[$_], \@{$ydata} ] }
    when @xdata is empty, but maybe you have an older one, and it infinite loops on the 0..-1?

    I know this is below where you think the script stops, but I notice that you don't do your data dump until 3 lines past the close...

    I don't recall if perl ever had such a misbehaviour, but it could explain why things don't work the way you expect, since @xdata is populated in the part of the loop where you're looking at @_ instead of @values.

    Please try

    perl -e'for(0..$#a){print "$_\n"}'
    from the command line, and make sure it returns without printing anything. If that's the case, this isn't the bug. If it DOES print out an endless stream of numbers, then there is your problem.
    --
    Mike
      perl 5.6.1, active state build 633

      I apologize for any misunderstandings... I took out the debugging statements when I posted (but one got through). The code most certainly doesn't get by the while loop. I had it printing the values of the time stamp and it stops at the corresponding value of the last time stamp in the file I tested it on. (by the way, the $_[0]variable I reference from time to time is just a quick hack I threw in ... it's an option to help in debugging somewhat, and somewhat as a test for a future feature. What it allows is for the user to specify that certain data has already been processed and is in a specified file (or the default one), so don't bother doing it again. I process certain files in this routine and get both data for an XY scatter plot, and also calculate the averages, so I threw that in.

      And, $PART3 should not be set to 0 once I get it set. There are three button clicks in the file (represented by a 0 -- a 5 if none). I want the data from the last button click onward -- there are several little 'complications' with this reasoning, but it doesn't really affect anything here, and is a result of the data mainly.

        I looked at it again this morning, and I'm still out of ideas...

        I guess it's time for you to start removing statements from the loop until it works, to find the problem statement :(
        --
        Mike