Rudif#!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;
In reply to Re: Read from a file and replace
by Rudif
in thread Read from a file and replace
by toddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |