in reply to Garbage Collection on Hash delete

Perl will, as people have noted, generally clean up memory as need be, and you don't usually have to worry about it. As has also been noted, occasionally you may want to do a
undef %foo;
if %foo has had a lot of elements in it. This is because perl does some caching and, while all the elements inside %foo are freed, the data structures perl has allocated for %foo itself will not normally be freed, as perl assumes that if you stuffed a half-zillion things in it once that you'll do it again. undeffing the array/hash/scalar forces perl to dump all the cache for the variable, which can be a significant amount of memory if you've put a million elements into the hash at one point.