Comment out line 5 of scratch2.pl and run the program. The output is:
real 2.00
user 0.00
sys 0.00
Alternatively, add the line - print $x; - to scratch2.pl and run the program (now we are printing $x twice). The output is:
real 2.00
user 0.00
sys 0.00
Hello world
Goodbye World
Hello world
Goodbye World
In other words, the timing information...
User Profile
Collapse
-
when i type in "time command " at the command line i get the following:
...
lines of output
....
real 0.5
user 0.4
sys 0.0
I want to store ALL the above output in a file (using a perl script). When i try to do this, i am only able to store the "lines of ouput" part. I am unable to store those last three lines, and i cant figure out why I am unable to.Leave a comment:
-
How to capture output of unix time command?
I want to execute a unix time command using perl, and capture the output (specifically, the time it takes the command to execute).
i tried using the system command:
system("time command ");
however, when i try to capture the output, the capture output does not contain the amount of time it took to execute
when i try to do:
$var = `time command `;
there is the same problem (the ouput...
No activity results to display
Show More
Leave a comment: