in reply to Capturing STDERR from a piped open
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.)perl -e 'open(C,"ls foo.bar 2>&1 |") or die $!; while(<C>){ print "I got the error\n" if (/No such/) }'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Capturing STDERR from a piped open
by tlm (Prior) on Aug 13, 2005 at 15:38 UTC |