in reply to Replace $a with $b if $a ne $b

Doesn't this do that directly? $a = $b; The conditional seems unnecessary since it has no effect.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Replace $a with $b if $a ne $b
by cog (Parson) on May 06, 2005 at 18:38 UTC
    Take this values of $a and $b:

    $a = 12; $b = 2;

    From his words:

    if $a does not match $b

    I assume he wouldn't want to put the 2 in $a, as $a already matches $b.