A Perl program can indeed leak memory if you accidentally (or intentionally!) set up circular references. Perl uses a "reference counting" scheme for tracking objects. Objects are reclaimed (garbage collected) when their reference count goes to zero. If you set up a pair of objects to reference each other, their reference counts will never go to zero, even after the variables that originally pointed to them have gone out of scope.