in reply to Re^3: Get data from a file to search and replace within a second file
in thread Get data from a file to search and replace within a second file

Unless c1 etc. are regular expressions, you'll want to use quotemeta. Here's a simple version that does more or less what you want, I think:
my ($fa, $fb) = @ARGV; open IN, $fa or die $!; my %h; while (<IN>) { my ($str, $rep) = (split)[2,3]; $h{$str} = $rep; } my $pat = join '|', map { quotemeta $_ } keys %h; $pat = qr/\b($pat)\b/; print STDERR "$pat\n"; open IN, $fb or die $!; while (<IN>) { s/$pat/$1$h{$1}/g; print; }