#! /usr/bin/perl -w use strict; my @current = `rpm -qa`; my @base = `cat /tmp/install.log`; my $cur_cnt = @current; my $base_cnt = @base; $cur_cnt -= 1; $base_cnt -= 1; foreach (@current) { # Reset to stay out of the negative when decrementing below. $base_cnt = @base; # Set these because the first iteration through the # loop gripes about unitialized value. $cur_cnt -= 1; $base_cnt -= 1; foreach (@base) { if ($base[$base_cnt] =~ $current[$cur_cnt]) { print "Unchanged: $base[$base_cnt]"; } else { #Do Nothing } $base_cnt -= 1; } }