in reply to Re^2: Alternate for "open"
in thread Alternate for "open"

Well, with the information you've added (the RAM on your box, the size of the files) it's clear that opening a file is not going to use up all your memory.

Did you try Corion's suggestion and remove all code except the loop through the files and the open() and close() statements?

From here it looks a lot like it's the rest of your code (that you didn't share) that is causing the problem. Once you've verified for yourself that it's not the open() call, you'll have to share the actual code you're using if you would like to get help.

The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^4: Alternate for "open"
by ravi45722 (Pilgrim) on Nov 17, 2015 at 04:53 UTC

    Its not possible to share the total code. Its nearly 2000 lines with 26 config files.(Total Config files size is 2 MB). Tell me a best way how to show all my code. I will try that

      Show the relevant parts. Remove lines from your code until either the problem goes away or you have identified the problem or you have reached 50 lines that you can show.