Well, for starters in might have something to do with the way you are creating your hash %hash. Each time you cycle through the outer loop @start_array grows in size (by a factor of 5) so each throw of the die results in every more iterations in the inner two loops. Here is what the count looks like:

throw of die: 1: iterations in inner two loops: 25 total iterations: 25 throw of die: 2: iterations in inner two loops: 125 total iterations: 150 throw of die: 3: iterations in inner two loops: 625 total iterations: 775 throw of die: 4: iterations in inner two loops: 3125 total iterations: 3900 throw of die: 5: iterations in inner two loops: 15625 total iterations: 19525 throw of die: 6: iterations in inner two loops: 78125 total iterations: 97650 throw of die: 7: iterations in inner two loops: 390625 total iterations: 488275 throw of die: 8: iterations in inner two loops: 1953125 total iterations: 2441400 ...

Did you mean for @start_array to be growing in size this way? By dice throw 10, @start_array will have 5 to the 10th power number of elements and the 10th throw will require 5*11 iterations to complete.


In reply to Re: Loaded die by ELISHEVA
in thread Loaded die by Microcebus

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.