in reply to Re: hash of arrays to a subrutine?
in thread hash of arrays to a subrutine?

What would you consider to be the advantage of using references compaired to not using them? What is the difference? Would a large program generally run faster when references are used compaired to when they are not used?

Replies are listed 'Best First'.
Re^3: hash of arrays to a subrutine?
by Corion (Patriarch) on Jan 07, 2006 at 14:33 UTC

    "It depends". In general, you can regard a reference as the key to a locker. Instead of passing around the things in the locker, you pass around the key. So, references can be used to avoid copying of values, but they are more expensive on overall access. So if you have "large" values, it can be worthwhile to pass them around as references, but Data::Alias might be a better and less convoluted way of avoiding passing around the references.