use Benchmark qw(:all); use Capture::Tiny ':all'; my $count; my ($one, $two) = (1,2); capture_stderr { print timethese(10000, { Name1 => 'print STDERR "line ", $one , " : $two done\ +n";', Name2 => 'print STDERR "line $one : $two done\n"', } ); }
[download]