sub compare { my( $old, $new )= @_; open OLD, "< $old" or die "Can't read $old: $!\n"; open NEW, "< $new" or die "Can't read $new: $!\n"; my %old; while( ) { chomp; $old{$_}++; } close OLD; my @new; while( ) { chomp; push @new, $_ if delete $old{$_}; } close NEW; my @old= sort keys %old; print "New sites:\n\t", join("\n\t",@new), $/; print "Old sites:\n\t", join("\n\t",@old), $/; }