in reply to Loop Timing

Do you just want something like this?:

foreach my $i ( 1 .. 11 ) { print "On iteration $i the time is ", scalar localtime(); }

For more info see localtime.


Dave

Replies are listed 'Best First'.
Re^2: Loop Timing
by Fletch (Bishop) on Feb 27, 2006 at 18:19 UTC

    And/or Time::HiRes given a sufficiently fast machine (one hopes that it takes less than a second to execute $i++ . . . :).