in reply to Finding the Shortest Element in an Array

How about .. my $first = (sort {length($a) <=> length($b)} @array)[0];
  • Comment on Re: Finding the Shortest Element in an Array