in reply to Re: keep running out of memory, help a newbie!
in thread keep running out of memory, help a newbie!

not sure how else to do the loop, wouldnt a for(;;) be the same thing and end up the same way? or am i missing something?
  • Comment on Re^2: keep running out of memory, help a newbie!

Replies are listed 'Best First'.
Re^3: keep running out of memory, help a newbie!
by Cow1337killr (Monk) on Feb 14, 2017 at 01:52 UTC
    ... use constant LEVEL_1_LOOP_MAXIMUM => 1400; # This code keeps the +program from looping forever. my $level_1_loop_counter; FOLLOW_LEVEL_1_LINK: for ( $level_1_loop_counter = 1 ; $level_1_loop_counter <= LEVEL_1_LOOP_MAXIMUM ; $level_1_loop_counter++ ) { #------------------------------------------ print $fh_log "Level_1_loop_counter: $level_1_loop_counter\n"; if ( $level_1_loop_counter > LEVEL_1_LOOP_MAXIMUM ) { die "Runaway program.\n"; } ...

    Notice the belt and suspenders approach.