I don't like passing things by reference unless either (A) the sub is going to modify it, or (B) it is so big that it is an efficiency concern. This is because the subroutine might modify it accidentally. Passing by value helps to isolate a bug to a smaller scope (or if the accidental modification doesn't effect the functionality of the sub - avoids it completely).
Plus its hard to keep track of what is a reference and what isn't, so I try to keep everything lexical and dereferenced to take advantage of the cleaner syntax.
-Andrew
In reply to Re^4: DBI select ids to @ids
by tomazos
in thread DBI select ids to @ids
by tomazos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |