I run into a ton of situations like this reporting from databases. You could try handling this like a lookup table:
foreach my $bids( keys %{ $config } ){
foreach my $itemcode( keys %{ $config->{$bids} } ){
foreach my $inner( @{ $config->{$bids}{$itemcode} } ){
print $inner; # If you just want to dump your vals
}
}
}