blob: ea692a1113646a825375ebb9f66af89e5324d2a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/perl
use strict;
use warnings;
my @cmd = (
q{date},
q{perl5.32.0 -le 'print "Hello world!"'},
q{python3.7 -c 'print("Hello world!")'},
q{ruby26 -le 'print "Hello world!"'},
);
my @res;
for (1..3) {
@res = ();
for (reverse @cmd) {
(my $q = $_) =~ s/'/'"'"'/g;
push @res, "\$ time $_\n" . `bash -c 'time $q' 2>&1`;
}
}
print join("\n", reverse @res);
|