in reply to Read from a file and replace

And there is the Slurp module - saves you a couple of lines
#!perl -w use strict; use File::Slurp; my $find = quotemeta("here.company.com/pagedir"); my $replace = "there.company.com/"; my @lines = read_file "file.html"; foreach (@lines) { s/$find/$replace/g; } write_file "newfile.html", @lines;
Rudif