#!/usr/bin/perl -w use strict; my @array = qw(hello superduper hi); #our good friend the ST (aka: Schwartzian Transform) my $shortest = shift @{[ map{$_->[1]} sort{$a->[0] <=> $b->[0]} map{[length $_, $_]}@array ]}; print $shortest;