Link to home
Start Free TrialLog in
Avatar of thomaszhwang
thomaszhwangFlag for United States of America

asked on

What does "@_" mean in Perl?

I've a Perl script which is written by someone else.  The following is just one line in it and I'm wondering what does the "@_" mean in that context.  Thanks.

my ($to, $from, $subject, $message) = @_;

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thomaszhwang

ASKER

So how do we manipulate on this list, because I find that line at the first line of a function definition.  Thanks.
Thanks.
So subroutine is being called by passing four values, right.

Now these four values are all stored in @_

In the first line they are being separated into the four variables.
I'd say they were being copied into local variables,
which can then be manipulated without affecting the original passed parameters.