#!/usr/bin/perl use warnings; use strict; my $scalar = 'a'; my @array = qw(1 2 3); some_sub($scalar,@array); sub some_sub { my $scalar = shift; # take the first element out of @_ # and the first element in this case is $scalar with 'a' # inside my @array = @_; # pass all the remaining arguments into # @array so it now contains 1,2,3 }