Better Code Through Destruction
tile imagePerl 5's reference counting scheme almost always keeps memory usage predictable...except for one corner case. The Resource Acquisition Is Initialization strategy helps avoid memory leaks--and can improve your use of exceptions, alarms, other resources, and even transactional systems. Igor Gariev demonstrates.
Read more at: http://www.perl.com/pub/a/2007/06/07/better-code-through-destruction.html?CMP=OTC-BD0016219291&ATT=Better+Code+Through+Destruction.