The easiest way to dereference, in my opinion, is to always remember that arrays and hashes can only ever contain scalar values (see perldoc perldata). Which means that your array
my @AoA = ( ['aaa','hdr','500'],
['bbb','jid','424'],
['ccc','rde','402']);
...contains only three scalar values, which are references to other arrays. You could write it like this:
my $first = [ qw(aaa hdr 500) ]; # using qw() which will quote the args
my $sec = [ qw(bbb jid 424) ];
my $third = [ qw(ccc rde 402) ];
my @all = ($first, $sec, $third); # this array is now identical to @AoA
With this in mind, it is simple to imagine (like DVK suggested in his answer) a loop such as:
for my $aref (@all) {
# $aref will contain $first, $sec, and $third
}
And knowing that $aref is an array reference, the dereferencing is simple:
for my $aref (@all) {
for my $value (@$aref) {
# do your processing here
}
}
Also, since the values in a for loop are aliased, any changes to them affects the original array. So if the "processing" in the loop above contains an assignment such as
$value = $foo;
That means that the values in @all are also changed, exactly as if you had written:
$all[0][1] = $foo;