$^I = ".bak"; @ARGV = ('file.html'); while(<>) { # chomp; # don't want to loose the linebreaks my $string = "$_"; my $find = "www.3sat.de/boerse/boerse_service.html"; my $replace = "there.company.com/"; $find = quotemeta $find; $string =~ s/$find/$replace/g; print $string; }