args => [ # start an array reference \%formdata, # pass a hash reference $filelocation # pass a scalar ] # end an array reference # if you are passing this as an argument to your sub, you # need to dereference it sub mysub { $ref = shift; # now we have the array ref # use array reference notation to access the elements $first_element = $ref->[0]; }