in reply to forking memory problem

You should always turn on use strict; in your code, especially when your code is quite complex.

Have a look at the following loop (without use strict):
for ($i=1;$i<=5;$i++) { print "inside loop - \$i = $i\n"; } print "outside loop - \$i = $i\n";
What do you think the value of $i is outside the loop?

inside loop - $i = 1 inside loop - $i = 2 inside loop - $i = 3 inside loop - $i = 4 inside loop - $i = 5 outside loop - $i = 6
I suspect your problem is with the value of $i outside the loop.

Replies are listed 'Best First'.
Re: forking memory problem
by Abigail-II (Bishop) on Nov 28, 2003 at 08:35 UTC
    You should always turn on use strict; in your code, especially when your code is quite complex.

    You mean, modern Perl will segfault (because that's what the error message seems to indicate) if you don't turn on strict? Where is that documented?

    Abigail

      That was just a general comment I made about the coding style, not to do with the segfault.

        Well, it turns out that running it on Perl 5.8 - it works.
        Perl 5.6 was a little flaky with the memory issue.