in reply to Capturing STDERR from a piped open

That's odd -- it works for me. In a path where "foo.bar" does not exist, running this gives me "I got the error", and nothing else:
perl -e 'open(C,"ls foo.bar 2>&1 |") or die $!; while(<C>){ print "I got the error\n" if (/No such/) }'
Maybe you need to be sure about the particular shell that is being invoked when you do the pipeline open? (Mine is /bin/bash; I think C-shells are brain-damaged when it comes to redirecting stderr.)

Replies are listed 'Best First'.
Re^2: Capturing STDERR from a piped open
by tlm (Prior) on Aug 13, 2005 at 15:38 UTC

    On Unix it's always /bin/sh -c.

    the lowliest monk