It's almost indentical to your subject:
Replace $a with $b if $a ne $b
$a = $b if $b ne $a;
which simplifies to:
$a = $b;
Or maybe you wanted
$a = $b unless $a =~ /$b/;
In reply to Re: Replace $a with $b if $a ne $b
by ikegami
in thread Replace $a with $b if $a ne $b
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |