Sounds like the program is designed (either intentionally or accidentally) to need more memory as it runs. Either way, that's not related to the memory-releasing characteristics of perl. (You can't expect a process to release memory that it thinks it's still using.)
Do you think it should need extra memory as it runs ? If not, then there's probably a memory leak (unused memory not being freed for re-use by the process) that needs to be fixed.