What is @_ in Perl?

This is the first thing that confused me when I started to learn Perl. But I knew this is something important.

You can define it as parameters expanded.

Like the parameters are passed to a sub using the @_ variable:

sub test{
  my ($a, $b, $c) = @_;
  ...
}

# call it then with the parameters
test('perl', 'programming', 'call');

@_ is the list of incoming parameters to a sub.

tags: & category: -