@items = qw(0 1 2 3 a b c d e 9 10 11);
($i,$j) = (4,8);
$c = sub { $b cmp $a }; # sort alpha descending
say '# ', join ' ', @items;
@items[$i..$j] = sort $c @items[$i..$j];
say '# ', join ' ', @items;
# output:
# 0 1 2 3 a b c d e 9 10 11
# 0 1 2 3 e d c b a 9 10 11
@items = qw(0 1 2 3 a b c d e 9 10 11);
($i,$j) = (4,8);
$c = sub { $b cmp $a }; # sort alpha descending
say '# ', join ' ', @items;
@items[$i..$j] = sort $c @items[$i..$j];
say '# ', join ' ', @items;
# output:
# 0 1 2 3 a b c d e 9 10 11
# 0 1 2 3 e d c b a 9 10 11