http://www.perlmonks.org?node_id=791458


in reply to difference between pointer and referrence in perl

Perl's references are more than just C pointers. Perl reference counts objects so the reference object that holds onto the 'address' of another object is more like a C++ smart pointer with a whole world of semantics hidden under a fairly conventional looking syntax. Most of the time you needn't worry about the extra semantics, it just works. Occasionally you run into memory leaks with interesting structures that contain reference loops that have to be forcibly broken before the Perl can dispose of the object.


True laziness is hard work
  • Comment on Re: difference between pointer and referrence in perl