#/usr/bin/perl #Prompt for the files we want to compare, for now just two print "Enter filename that contains output of show access ); print "Enter the second file\n"; chomp ($aoutput1 = ); #Open our files open (IN, $aoutput) || die "Couldn't open $aoutput $!"; open (LOG, ">>matches.txt") || die "Couldn't open matches.txt $!"; open (IN1, $aoutput1) || die "Couldn't open $aoutput1 $!"; #Push each line in file 1 that does not get any matches into an array while (){ push @aoutput unless /matches\)$/; } #Push each line in file 2 that does not get any matches into an array while (){ push @aoutput1 unless /matches\)$/; } #See if the lines that didn't get matches on day 1 #didn't get matches on day 2 as well #Gotta be a better way to do this? while (<@aoutput>){ $linetemp = grep {/$_/i} @aoutput1; if ($_ = $linetemp) { print $_; } }