for($i=0;$i<$c_IN;$i++) { print "$i $c_IN $in_i\n"; $x[$i] = $actafer[$in_i][$i]; if (not defined $x[$i]){die;} }
The $i's are counter up to 34, as they should, then $i is reset to 0 (in the same loop) which causes $x[$i] = $actafer[$in_i][$i]; to fail. Output is:
........ 28 35 9 29 35 9 30 35 9 31 35 9 32 35 9 33 35 9 34 35 9 0 35 ARRAY(0xa04116c) Out of memory during "large" request for 1073745920 bytes, total sbrk( +) is 31744 0 bytes at neuronalnetwork.pl line 137.
I was wondering why $i is reset to 0?

In reply to Re: Re: Code fails without any reason? by Bluepixel
in thread Code fails without any reason? by Bluepixel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.