in reply to Why Did This Stall the Server

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^