http://www.perlmonks.org?node_id=671143


in reply to Re^2: Changing local variables in subroutine by passing by reference?
in thread Changing local variables in subroutine by passing by reference?

My second example didn't uses references at all! That's the differences.

Note that normally your subs are built like this:

sub my_sub { my ($arg1, $arg2) = @_; ... }

The assignment to another variable breaks the alias, so if you change $arg1, @_ will not be modified. But if you modify @_ directly,