Radhika Sambamurti wrote:
I am trying to substitute "TR" for "TC".
But I do not want words like "AUDIT TRAIL" to be substituted.
So my regexp is:
if( =~ / TR / ) {
s/TR/TC/g
}
But this is not exactly working.
You probably want to use the word boundary assertion:
s/\bTR\b/TC/g;
See "perldoc perlre".
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>