use List::Util qw/reduce/; @array = qw( hello superduper hi ); print reduce { length( $a ) < length( $b ) ? $a : $b } @array;
In reply to Re: Finding the Shortest Element in an Array
by borisz
in thread Finding the Shortest Element in an Array
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |