in reply to Re: timing a command execution with perl
in thread timing a command execution with perl

Indeed I used it in my perl program:
system("time", "program-name", "file-name"); but the out is different (and confused) with respect to that right output I have just typing time program-name file-name in the shell.

Replies are listed 'Best First'.
Re^3: timing a command execution with perl
by Anonymous Monk on Dec 09, 2014 at 15:07 UTC

    time typically outputs its values to STDERR (unless your version supports the -o option). To capture STDERR in a Perl program, something like Capture::Tiny or IPC::Run3 makes that easy. (Or you can use shell redirects.)