in reply to Improving memory performance

How do I free up memory (e.g. objects) I no longer need?

@array = (); # empty the array %hash = (); # empty the hash $var = undef; # empty the variable
You'll also see people using undef to undefine things. Consult perlfunc for details on undef.