in reply to Finding the Shortest Element in an Array

Here's the long drawn-out way, but I'm sure some people will be along shortly with more elegant solutions:

my @array = qw(hello superduper hi); my $shortest = $array[0]; for( @array ) { $shortest = $_ if length $_ < length $shortest; }