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


in reply to Re: Using 'Shift' in subroutine argument
in thread Using 'Shift' in subroutine argument

The shift without an argument defaults to @_.

except in main scope (outside a sub) where shift operates on @ARGV by default. Consider:

perl -e "print shift" wibble

Prints:

wibble

Perl is environmentally friendly - it saves trees