$hash{'mykey'}
now, if you want to operate on that array, you have to dereference it. I find -> the easiest way, e.g. to get the first element of that arrayref:
$hash{'mykey'}->[0]
now, to use the array-functions, you need list-context, e.g.
push @{ $hash{'mykey'} }, 'new element';
or
print scalar @{ $hash{'mykey'} };
iteration is simple:
my %hash = ('ar1' => ['elem1', 'elem2'], 'ar2' => ['elem3', 'elem4']);
for my $key (keys %hash)
{
print "now running: " . $key . "\n";
for (my $i = 0; $i < scalar @{ $hash{$key} }; $i++)
{
print "\t" . $i . ": " . $hash{$key}->[$i] . "\n";
}
}
pasting code for anonymous array refs actually breaks the ubb-code, so I had to split it into two blocks.
I haven't tested that code, but it should work fine. If not, report back and I'll try to help