rbc has asked for the wisdom of the Perl Monks concerning the following question:
my $cmd = "sqlldr userid=xyz/xyz@xyz control=myfile.ctl"; if( OUT, open( "$cmd|" ) ) { while(<OUT>) { if (/'error'/i) { print "Holy balony! The server is down Batman!"; ... } else { print $_; } } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Catching STDERR with open (
by cjf (Parson) on Mar 11, 2002 at 23:19 UTC | |
Re: Catching STDERR with open (
by particle (Vicar) on Mar 12, 2002 at 01:53 UTC | |
Re: Catching STDERR with open (
by pizza_milkshake (Monk) on Mar 12, 2002 at 03:41 UTC | |
Re: Catching STDERR with open (
by jepri (Parson) on Mar 12, 2002 at 12:10 UTC |