Help for this page
@b = sort { length $b <=> length $a } @a;
@b = sort { length $b <=> length $a || $a cmp $b } @a;