Please read
perlsub, perhaps
perlsyn, and a good introductory Perl book such as "Learning Perl". Briefly, arguments to subroutines are passed via the special
@_ array (see
perlvar). Use
shift to pull these out one-at-a-time, access elements of this array individually, or pull them all out at once via a list assignment.
Originally posted as a Categorized Answer.