Hi, 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. As i want only those instances when TR is surrounded by spaces ie not part of any other word to be substituted. The sample file i want to make the changes in is below: ---------------------------------------------------------------- if ($_ eq $AUDIT_TRAIL_FIELD) my $doc = "TR" . $pr . "Doc"; mark_urls($q->escapeHTML($fields{$AUDIT_TRAIL_FIELD})), my $page = "Edit TR $pr"; error_page("You must specify a TR number"); Clone this TR for other release</b></font><br><br> "; print "<h1>Edit TR: $pr</h1>"; if ( $default =~ /\s/ ) # we got multiple releases TR my $doc = "TR" . $pr . "Doc"; if ( confirm ("State was changed to feedback, but Responsible was not re-assigned.\\n Click Cancel to re-assign Responsible, click OK to submit TR as is.\\n") ) mark_urls($q->escapeHTML($fields{$AUDIT_TRAIL_FIELD})), my $page = 'Edit TR Results'; error_page("You must specify a TR number"); print "<h3>debugging -- TR edits not submitted</h3><font size=1><table cellpadding=\"5\" width=\"95%\">"; error_page("Sorry, TR $pr has been modified since you started editing it.", 'or "TR\'s", not "bugs".'); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>