in reply to multi dimension array

I whould use a hash.
my %h = ( fruits => { p => [ 'peach' ], g => [ 'grapes' ], }, birds => { p => [ 'parrot' ], c => [ 'crow' ], } );
Get all fruits with p
@all_p_fruits = @{$h{fruits}->{p}};
to add a fruit use
push @{$h{fruits}->{p}}, 'peach_yellow';
Boris