use List::Util qw(reduce); # from the CPAN my $max = reduce { $a > $b ? $a : $b } @list; my $string = reduce {$a . $b } @list; #### my $count = reduce { $a + $b =~ /the/ } 0, ;