Good morning, I'm new at all of this but managers want me to look at an Oracle alert log .
I call this mail. I want to eliminate from mail.fil certain lines with numbers contained in file THIDSerrs.
!/usr/local/perl-5.12.3/bin/perl
use strict;
use warnings;
open FILE,"< mail.fil";
my @oralines=<FILE>; close FILE;
#print @oralines;
open FILE,"<THIDSerrs";
my @errs = <FILE>;
close FILE; #print @errs;
my @subarray = ();
foreach my $oralines(@oralines)
{
foreach my $errs(@errs)
{
push @subarray, $oralines if grep /$errs/, @oralines; } } print "@sub
+array \n";
This doesn't return anything!
<code>
!/usr/local/perl-5.12.3/bin/perl
use strict;
use warnings;
open FILE,"< mail.fil";
my @oralines=<FILE>; close FILE;
#print @oralines;
open FILE,"<THIDSerrs";
my @errs = <FILE>;
close FILE; #print @errs;
my @subarray = ();
foreach my $oralines(@oralines)
{
foreach my $errs(@errs)
{
push @subarray, $oralines if grep /$errs/, @oralines; } } print "@sub
+array \n";
This doesn't return anything! Looking to find common elements between two files and eliminate from one file (mail.fil)