#!/usr/bin/perl -w use strict; use Benchmark; timethese(100000, { 'loop' =>'loop()', 'noloop' => 'noloop()' }); sub loop { my $x; for (1..10) { $x++; } } sub noloop { my $x; $x++; $x++; $x++; $x++; $x++; $x++; $x++; $x++; $x++; $x++; }