I would appreciate if you could please correct my understanding of the following code in perl:
my $sgn = "(b|f|h|m)";
$sometext =~ s/([^$sgn])d$/$1X/g;
What I think is happening here is that it tries to match a character which is not in the $sgn. then if this character happens to be the one next to the last letter and if the last character is d it replaces the two last character by X? For example book will not change but bad will change to bX. Put it simply if the last two letters are a combination any of the letters not in $sgn and d it will replace them by X. Thanks in advance for your comments. Bid