My solution didn't have a problem with 50% of 11 per say. My solution always gave the wrong answer. (The OP confused me by saying 10% should give B - B - - - - A A - when that's the output for 20%.) Fixed.
my $portion = 0.50;
my @array = (1..11);
B B B B B - A A A A A