in reply to reference , advantages?
You most likely use references a lot more than you realize, just in the ordinary course of using Perl to do anything. A reference is not only “a way to have one thing at two or more places at one time,” but also a very light-weight way to “carry a thing around” without actually copying it and carrying it. As long as you are aware and mindful of the weaken method (in Scalar::Util), and the small issue of cyclic memory references, it all works very well indeed.
Computer programs often get buzzed about being “computationally” inefficient, even though the real cause of delay is almost invariably either I/O-wait or page-fault-wait. The smaller your program’s working-set is, and the more stable it is, the more efficiently it will be able to run. So, it is very advantageous indeed to be able to have just one copy of “that million-page elephant” lying about, and to only deal with references to it ... which are tiny, and free.
The dis-advantage, which you also need to be aware of, is that when two variables refer to the same thing, they are basically EQUIVALENCEd, borrowing the Fortran term ...