$someText =~ s/quotemeta('$array1{$count}')/quotemeta('$array2{$count}')/g;