in reply to
Replace $a with $b if $a ne $b
For what you say, it seems that this is what you want:
unless ($a =~ /$b/) { $a = $b; }
[download]
Comment on
Re: Replace $a with $b if $a ne $b
Download
Code
In Section
Seekers of Perl Wisdom