In the perlvar documentation there is a text about @_:
Within a subroutine the array @_ contains the parameters passed to that subroutine. Inside a subroutine, @_ is the default array for the array operators push, pop, shift, and unshift.
It is a common way to use shift without parameters to get first element from the array. It is very often used as:
sub some_method {
my $self = shift; # the same as `my $self = shift @_;`
...
}
But in the documentation there is written that it can be used with push, but I can't create working example without explicitly specifying @_ to the push. From reading this doc I'm expecting push 123; to push to @_, but it is not working.