in reply to Sort by string length

You can create a custom sort routine by providing a sub of your own. See sort.

@sorted = sort { length($a) <=> length($b) } @elements;

HTH

Update: I see I don't type quite as quickly as kesterkester or Enlil... see Re: Sort by string length.