I know Perl frees you from a lot of memory concerns, but I have come across a memory problem. I have a script that reads in these very large text files, does calculations on the data, and spits out some output. On my system with ample RAM this works runs like a dream, but it's going to be run on a lot of different systems and I want to avoid sending the hard drive into page out thrashing fits when memory is tight. I can easily modify the data structure to store itself in a temporary file, but I would prefer this only happen when needed, since it will severely effect an already lengthy execution time. Is there an easy cross platform Perlish way to get an idea of how much RAM is still free, how much memory my program has eaten up, etc? Thanks in advance for you're help.
James