#!/usr/bin/perl use warnings; use strict; my %git=(); my $git_file = "/tmp/git_sorted.log"; open(GIT,'<',$git_file) or die "Really bad $git_file : $!"; while (){ chomp; $git{$_}=1; } close GIT; my $yum_file = "/tmp/yum_sorted.log"; open(YUM,'<',$yum_file) or die "Really, really bad $yum_file : $!"; while (){ chomp; if (exists $git{$_}){ # exists } else { # new print "$_ package not in $git_file\n"; } } close YUM;