First off, I'm a newbie. I started learning the language a week ago. My problem might start there. Here's the situation: I've got a 470 (with documentation) line script that works absolutely flawlessly. No problems at all. The problems occur when I wrap the subroutine calls in a loop to repeat the script every x seconds until I kill the thread. As soon as I do this, the FileHandle that I throw my output at can no longer handle as much information and just stops listening. The information thrown at it just flies off into nothingness. Here's what the subroutine call section looks like:
$TIMER = 10; while (TRUE) { &initialScreenOut; &beginFileIO; &htmlHeader; &timeStamp; &legend; my @PORTS = ("24","26","26","26"); my @BASE = ("0x0000F6AE2D41","0x0000F6BC4401","0x0000F6BC3B41","0x0000 +F6BC5C01"); &makeTable ( "134.200.212.109","DeskStream1", 4, 26, \@BASE, \@PORTS); my @PORTS2 = ("24","24","26"); my @BASE2 = ("0x0000F6D83301","0x0000F6E2E901","0x0000F64C09C1"); &makeTable ( "134.200.212.190","DeskStream2", 3, 26, \@BASE2, \@PORTS2 +); my @PORTS3 = ("26","24","24"); my @BASE3 = ("0x0000F64C2701","0x0000F64C2281","0x0000F64C3981"); &makeTable ( "134.200.212.189","DeskStream3", 3, 26, \@BASE3, \@PORTS3 +); &htmlFooter; &finalScreenOut; sleep($TIMER); }
When I comment out the first two lines of this code and the last two lines of this code (effectively, all of the code that handles the looping), the script works fine. When I leave them in, I get the apparent buffer overflow problems with the FileHandle. Anybody have any idea what's going on?

In reply to Buffer overflow by mikeo

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.