in reply to Memory monitoring

Providing your variables are properly scoped to the smallest possible enclosing scope with my you shouldn't have any "memory leaks". At most you should hit a maximum size (dependent on the largest size of what you're pulling out of the row) and stick around there (or slowly grow if you're remembering stuff from line to line). Depending on the platform you could use system tools like top or ps to watch the process as a whole, or a module like Devel::Size to see how big your Perl data structures are getting.

Show some actual code and you might get more helpful responses than my generalities.