use strict; use warnings; use Time::HiRes 'time'; my $start_time = time; system(@ARGV) == 0 or die "\"@ARGV\" failed with error: $?"; printf "%0.03f seconds\n", time - $start_time;