in reply to greping errors from ORACLE

push(@errors, grep (/ERROR|ORA-ERR|Fail|Unable/i, $_));
You're either confused, or very clever.

Let's try:

perl -e 'push(@a,grep(/bra/,"abracadabra")); print @a;' abracadabra perl -e 'push(@a,grep(/bar/,"abracadabra")); print @a;' (no output)
Wow! It works.

My proposed solution for your problem is to put a line like

next if /ORA-\d: unique constraint \(.*?\) violated/;
just before the push line.

Replies are listed 'Best First'.
Re: Re: greping erros from ORACLE
by Fletch (Bishop) on Apr 16, 2004 at 16:44 UTC

    grep on a hardcoded, one element list is clever? Some might say inefficent. My vote would be for confused and grasping at random functions which appear to be cognates to existing Unix knowledge.