Subject: | 'open() or die' cannot work with pipe |
Hi,
I got problem using 'open() or die' paradigm when I have open() with pipe on Strawberry Perl:
C:\>perl -E "open(FH, 'foo |') or die; say 'I am still alive';"
I am still alive
'foo' is not recognized as an internal or external command,
operable program or batch file.
open() with pipe always returns true even if there is no 'foo' program existed. In Linux, the same program gets following result
% perl -E "open(FH, 'foo |') or die; say 'I am still alive';"
Died at -e line 1.
I think 'open() or die' behavior should be portable in Perl?
My Strawberry Perl version is 5.28.0.1_x64 in Win7.
Thanks.