use strict; use warnings; use Benchmark qw( cmpthese ); my $OUTER = $ARGV[0] || -3; my $INNER = $ARGV[1] || 1000; sub explicit { return $_[0] } sub implicit { $_[0] } my %tests = map { $_ => "use strict; use warnings; for (1..$INNER) { my \$rv = $_(1); } " } qw( explicit implicit ); cmpthese($OUTER, \%tests); print("\n"); print("Multiply by $INNER to get real rate.\n");