#!/usr/bin/perl use warnings; use strict; my $git_dir = "/tmp/yum_sorted.log"; open(DIR,$git_dir) or die "Really bad!$!"; my @yum = ; foreach my $line ( @yum ) { open(IN_GIT, "/tmp/git_sorted.log") or die "Really, really bad $!"; my @in_git = ; foreach my $x ( @in_git ) { if ( $line =~ $x ) { print "We found a match: $line\n"; } }