FAQ

On Fri Jul 05 09:16:43 2013, [email protected] wrote:


This is a bug report for perl from [email protected],
generated with the help of perlbug 1.39 running under perl 5.18.0.
# is this difference in $? expected or a bug?

$ perl -e 'use warnings; local $?; qx(command_not_in_path_arglebargle
2>&1); print "$?\n";'
-1
$ perl -e 'use warnings FATAL => "all"; local $?;
qx(command_not_in_path_arglebargle 2>&1); print "$?\n";'

$ perl -e 'use warnings; qx(command_not_in_path_arglebargle 2>&1);
print "$?\n";'
-1
$ perl -e 'use warnings FATAL => "all";
qx(command_not_in_path_arglebargle 2>&1); print "$?\n";'
512

I tripped on the zero case (the second invocation) above. I expected
$? to be non-zero after the qx().

I get consistent results for the above on 5.8.7, 5.10.1, and 5.18.0.
Those are the only versions I tried.
I got similar results for perl 5.18.0 on Darwin/PPC and on Linux/i386.

---
via perlbug: queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118767

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedJul 12, '13 at 1:14a
activeJul 12, '13 at 1:14a
posts1
users1
websiteperl.org

1 user in discussion

James E Keenan via RT: 1 post

People

Translate

site design / logo © 2023 Grokbase