- or download this
while(<INFILE>){
$_ =~ s/$searchPattern1/$repalcePattern1/g;
...
$_ =~ s/$searchPattern3/$replacePattern3/g;
print OUTFILE $_;
} # end while
- or download this
if ($_ == s/$searchPattern1/){
print("$searchPattern1 replaced with $replacePattern1 \n");
...
}else{
print("Search Patterns not found");
}
- or download this
while(<INFILE>){
if ($_ == s/$searchPattern1/){
...
}
print OUTFILE $_;
} # end while
- or download this
<SOURCEFILE>
foo bar <\n>
...
foo bar<\n>
foobar<\n>
BlahBlah Blah<\n>