in reply to Re^3: Top and bottom 10 percent elements of an array
in thread Top and bottom 10 percent elements of an array

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

Same goes for codeacrobat's answer.