in reply to Perl Program - Out of memory?

Please post your code. You may be storing something into memory (explicitly or implicitly), but we can't know without seeing what you do.