What's wrong:

  1. No use of strict or warnings - Use strict warnings and diagnostics or die
  2. No use of CGI.pm - use CGI or die;
  3. Vast amount of global variables
  4. Bad looping, you should be using foreach to iterate over arrays
  5. Using @ary[$i] instead of $ary[$i]
  6. Use of 'magic numbers'
  7. Using loops where the exit condition may not be met - while ($gamenumber == -1)
  8. Complete lack of any useful comments
  9. Repetitive code that suggests refactoring should occur
  10. Using an $exitflag variable instead of last to exit a loop
  11. Using $#ary to determine the end of the array rather than for/foreach (see #4)
  12. Using " to quote and being forced to escape (\") quotes, when q/qq would help

I'm guessing that the real problem is something to do with an exit condition in one of your loops not being met.

gav^


In reply to Re: Why Did This by gav^
in thread Why Did This Stall the Server by Anonymous Monk

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.