in reply to
Conditional replace
Another way:
$FileText =~ s/($Search|$)/$1 eq $Search ? $Replace : $AddText/e;
§
George Sherston
Comment on
Re: Conditional replace
Download
Code
In Section
Seekers of Perl Wisdom