sample code snapshot: sub f2 { my $ht_ref = shift; my %ht = %$ht_ref; print "some val = ", $ht{1}, "\n"; %ht=(); undef %ht; } sub f1 { my %ht=(); my $i; for ($i=0; $i<0xfffff; $i++) { $ht{$i} = $i; } f2 (\%ht); %ht=(); undef %ht; } f1(); while (1) { # sleep here and monitor the memory. memory # does'nt seem to come down :(( sleep (5); }