I have a function that takes a variable and an associative array, but I can\'t seem to get them to pass right. I think this has something to do with function declarations, h
Arguments to functions get flattened into a single array (@_). So it's usually easiest to pass hashes to function by reference.
To create a HASH:
my %myhash = ( key1 => "val1", key2 => "val2" );
To create a reference to that HASH:
my $href = \%myhash
To access that hash by reference;
%$href
So in your sub:
my $myhref = shift;
keys %$myhref;