I think my mistake was that the individual vars weren't being passed, but rather an array containing the references to the hash and the scalar.
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!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.