Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of IlyaM (2933)

Tuesday October 14, 2003
07:09 AM

open() and pipes quiz

[ #15201 ]

What is the difference between these two lines (on Linux with Perl 5.8.x or 5.6.x). More precisely why does only first open die?

open(FH, '/doesnt/exist  2>&1 |') or die "Cannot pipe: $!";

open(FH, '/doesnt/exist\\  2>&1 |') or die "Cannot pipe: $!";

Hint if you have no idea: try to remove 2>&1 from command line.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.