in reply to Namechange
open OUT, "> index.html" or die "$!"; # open the new HTML file open IN, "index.html.old" or die "$!"; open the old HTML file to be re +ad in while (<IN>) { s/@xyz\.com/@xyzabc\.com/g; #for every line that has @xyz.com r +eplace it with @xyzabc.com print OUT; # print the line into the new HTML file } close IN or warn "$!"; # close the old file close OUT or warn "$!"; # close the new file
|
|---|