What is the meaning of
perldoc perlvar is the first place to check for any special-named Perl variable info.
@_: Within a subroutine the array
@_contains the parameters passed to that subroutine.
More details can be found in perldoc perlsub (Perl subroutines) linked from the perlvar:
Any arguments passed in show up in the array
Therefore, if you called a function with two arguments, those would be stored in
@_is a local array, but its elements are aliases for the actual scalar parameters. In particular, if an element $_ is updated, the corresponding argument is updated (or an error occurs if it is not updatable).
If an argument is an array or hash element which did not exist when the function was called, that element is created only when (and if) it is modified or a reference to it is taken. (Some earlier versions of Perl created the element whether or not the element was assigned to.) Assigning to the whole array @_ removes that aliasing, and does not update any arguments.