From: Jarkko Hietaniemi Date: Tue, 12 Feb 2002 04:29:10 +0000 (+0000) Subject: Use `` instead of -| to be a little bit more portable, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2bf35fab2c5ffa0935020ee96f5e6e8e87c60732;p=p5sagit%2Fp5-mst-13.2.git Use `` instead of -| to be a little bit more portable, from Michael Schwern. p4raw-id: //depot/perl@14653 --- diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t index b7ed459..1340fcd 100644 --- a/lib/ExtUtils/t/Embed.t +++ b/lib/ExtUtils/t/Embed.t @@ -110,18 +110,13 @@ if ($^O eq 'VMS') { } } my $status; -my $display_cmd = "@cmd"; -chomp($display_cmd); # where is the newline coming from? ldopts()? -print "# $display_cmd\n"; - # On OS/2 the linker will always emit an empty line to STDOUT; filter these -$status = -1; -{ - open my $cmdfh, '-|', join(' ',@cmd) or last; - print "#$_" while <$cmdfh>; - close $cmdfh; - $status = $?; -} +my $cmd = join ' ', @cmd; +chomp($cmd); # where is the newline coming from? ldopts()? +print "# $cmd\n"; +my @out = `$cmd`; +$status = $?; +print "# $_\n" foreach @out; if ($^O eq 'VMS' && !$status) { print "# @cmd2\n";