in reply to Re: Re: passing hash elements as parameters
in thread passing hash elements as parameters
You're mostly correct; an array reference containing the elements are being passed, not just a plain array. Here's a breakdown that might help:
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]; }
--
hiseldl
What time is it? It's Camel Time!
|
|---|