This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Benchmark.pm: timethese corrupts $_
authorAbigail <abigail@abigail.be>
Sun, 1 Feb 1998 06:46:08 +0000 (01:46 -0500)
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>
Fri, 6 Feb 1998 16:43:46 +0000 (16:43 +0000)
p4raw-id: //depot/perl@474

lib/Benchmark.pm

index 13acf86..e09bc92 100644 (file)
@@ -367,7 +367,9 @@ sub timethese{
 
     # we could save the results in an array and produce a summary here
     # sum, min, max, avg etc etc
-    map timethis($n, $alt->{$_}, $_, $style), @names;
+    foreach my $name (@names) {
+        timethis ($n, $alt -> {$name}, $name, $style);
+    }
 }
 
 1;