in reply to Run a script multiple times and store the running time

How about:

#! perl -slw use strict; use Time::HiRes qw[ time ]; while( my $arg = <DATA> ) { my $start = time; system "perl script.pl $arg"; printf "With '%s' took: %.3f seconds\n", $arg, $time() - $start; } __DATA__ 1000 args here ... ...

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Run a script multiple times and store the running time
by Anonymous Monk on Oct 14, 2016 at 09:22 UTC
    Just a minor correction here (I hope no offence is taken):
    It seems that :
     printf "With '%s' took: %.3f seconds\n", $arg, $time() - $start;
    should instead be:
    printf "With '%s' took: %.3f seconds\n", $arg, time() - $start;
Re^2: Run a script multiple times and store the running time
by Anonymous Monk on Oct 13, 2016 at 22:12 UTC
    Aha, I will give it a try!
    Thank you!