On Thu, Jan 12, 2006 at 10:15:54PM -0500, Ronald J Kimball wrote: > The tip from this meeting: > Avoid using ampersand on subroutine calls. In particular, &mysub > (ampersand but no parentheses) passes the current @_ to mysub(), which can > be problematic if you're not expecting it.
I used to use that occassionally, back in the days when computers were about one 1000'th the speed of current models, for front end functions that would adjust @_ in some way and then call the real back end function - this was to avoid having to make an extra copy of @_ for the second function call (both for the time and space involved in the copy). Nowadays, unless you're passing a huge arggument list around, the performance cost of the copy is insignificant compared to the obfuscation cost of not copying. -- _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

