Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Two disadvantages of the “plain old” method of subroutine argument passing are that (1) even though you can modify its elements, you can’t modify an array or hash argument itself, and (2) copying an array or hash into @_ takes time. You can overcome both of these disadvantages with references (Item 58).
When you pass arguments to a subroutine, Perl aliases @_ to them. It does this for efficiency. When you store them in variables, Perl then makes a copy. The more arguments you pass, the more work Perl has to do. For instance, you can write a subroutine to sum a list of numbers. It takes the list directly from the arguments: