$concat = 999999 x 'abcdefghijklmnopqrstuvwxyz'; #### use Benchmark 'cmpthese'; use strict; use warnings; my @stuff = 1 .. 20000; cmpthese(-3, { 'for EXPR' => sub { my $a = 0; ++$a for @stuff; }, 'for BLOCK' => sub { my $a = 0; for (@stuff) { ++$a } }, 'map BLOCK' => sub { my $a = 0; map { ++$a } @stuff; }, 'map EXPR' => sub { my $a = 0; map ++$a, @stuff; }, }); __END__ Rate map BLOCK map EXPR for BLOCK for EXPR map BLOCK 50.4/s -- -4% -44% -49% map EXPR 52.3/s 4% -- -42% -47% for BLOCK 89.9/s 78% 72% -- -9% for EXPR 98.6/s 96% 89% 10% -- This is perl, v5.8.0 built for MSWin32-x86-multi-thread