Implicit Ideas: The Default Array Variables
Learn about the default array variables in Perl.
We'll cover the following...
Function arguments array: @_
Perl provides two implicit array variables. Perl passes arguments to functions in an array named @_. Array operations inside functions use this array by default. These two snippets of code are equivalent:
sub foo {my $arg = shift;...}
Just as $_ corresponds to the pronoun “it,” @_ ...