#!/usr/bin/perl use warnings; use strict; open( my $out_fh, ">", "Output.txt" ) || die "Can't open the output file for writing: $!"; open( my $address_fh, "<", "Changes.txt" ) || die "Can't open the Changes file: $!"; my %lookup = map { chomp; split( /,/, $_, 2 ) } <$address_fh>; open( my $file_fh, "<", "Input.txt" ) || die "Can't open the Input.txt file: $!"; while (<$file_fh>) {