Perl program



write a Perl program that prompts for an input filename, an output filename, a search pattern, and a replacement string, and replaces all occurrences of the search pattern with the replacement string while copying the input file to the output file.