It appears it is maybe a system limitation or error not a script error or a bug in Perl (Unless you use a different version other than 5.8).

I ran your original script on my RedHat Linux box and my Windows XP Laptop (running activeperl) and it ran fine on both.

[root@thegnuage perl-scripts]# perl -c abi abi syntax OK [root@thegnuage perl-scripts]# chmod a+x abi [root@thegnuage perl-scripts]# ./abi 1 is a square 4 is a square 9 is a square 16 is a square 25 is a square 36 is a square 49 is a square 64 is a square 81 is a square 100 is a square 1 is a square 4 is a square 9 is a square 16 is a square 25 is a square 36 is a square 49 is a square 64 is a square 81 is a square 100 is a square 1 is a square 4 is a square 9 is a square 16 is a square 25 is a square 36 is a square 49 is a square 64 is a square 81 is a square 100 is a square

The following is all I could capture from my Windows command prompt because XP's command.exe sux and I have not hacked the registry yet.

64 is a square 81 is a square 100 is a square 1 is a square 4 is a square 9 is a square 16 is a square 25 is a square 36 is a square 49 is a square 64 is a square 81 is a square 100 is a square 1 is a square 4 is a square 9 is a square 16 is a square 25 is a square 36 is a square 49 is a square 64 is a square 81 is a square 100 is a square

What amount of Ram have you got in your system? Are you running many resource intensive apps at the same time as the script (Like any java apps)?

You could have a program giving you a memory leak and be unaware of it therefore you really are out of memory. Try a reboot and run the script again with minimal system apps running.

If after all that if you still get the error I would try reinstalling your perl interpretor or just compiling the script with perl2exe and then run it. If you still have the error I would say your memory sticks are going bad or one or all your DIMM slots on your systemboard are going bad and therefore giving erroneous indications.


In reply to Re: Unexpected 'Out of Memory' by Elijah
in thread Unexpected 'Out of Memory' by Abigail-II

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.