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
Tuesday October 14, 2003
07:09 AM
open() and pipes quiz
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.
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
open() and pipes quiz 0 Comments More | Login | Reply /