in reply to Re: How to capture compile errors from child program?
in thread How to capture compile errors from child program?
produced the following results on three platforms:use strict; use warnings; use Time::HiRes qw(time); use POSIX qw(strftime); timestamp(); my $fred = `echo plenty of fish`; timestamp(); warn $fred; timestamp(); open my $fh, 'echo ' . $fred . ' |'; $fred = <$fh>; close $fh; timestamp(); warn $fred; timestamp(); sub timestamp { my $t = time; my $date = strftime "%Y%m%d %H:%M:%S", localtime $t; $date .= sprintf ".%03d", ($t-int($t))*1000; print $date, "\n"; }
Windows: backtick: 12ms open: 11ms
SunOS: backtick: 17ms open: 8ms
Debian: backtick: 1ms open: 0ms
It doesn't look too significant with the trivial subprocess above, but if the subprocess is heavier the difference increases disproportionately on Debian - enough to change site standards.
One world, one people
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to capture compile errors from child program?
by kennethk (Abbot) on Aug 03, 2015 at 18:45 UTC | |
by anonymized user 468275 (Curate) on Aug 04, 2015 at 09:01 UTC | |
by kennethk (Abbot) on Aug 04, 2015 at 15:03 UTC | |
|
Re^3: How to capture compile errors from child program?
by Anonymous Monk on Aug 03, 2015 at 15:25 UTC |