in reply to Time command output is not stored into the variable.

And then there's the issue that the output you are expecting is from a sh builtin (not the external command from my first post), but you didn't ensure that sh is executed to interpret the command.
my $time = `/bin/sh -c 'time ...'`;