G'day lakssreedhar,
You haven't actually asked a question - please take a look at: How do I post a question effectively?
For the scenario you describe, I'd be looking at a positive look-behind assertion - see perlre - Extended Patterns for details.
Here's an example:
$ perl -Mstrict -Mwarnings -E ' my @words = qw{door name dad naming}; for (@words) { s{(?<=na)m}{+d}; say; } ' door na+de dad na+ding
-- Ken
In reply to Re: replace a character based on rule file
by kcott
in thread replace a character based on rule file
by lakssreedhar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |