in reply to replaceing text in file using replace prattern
If I read your code correctly, all you want to do is run two regex substitutions on the input file. This does not even have to be a Perl script, it could be a Perl command-one-liner:
perl -pe 's#<b>#/*<b>#ig; s#</b>#</b>*/#ig;' -i Rules1.txt
Check out this good tutorial on perl.com about file editing.
|
|---|