Because Perl is not C.
$a = $b if $a != $b; # or if you want to stick to the order if( ) then; $a != $b and $a = $b; [download]
In reply to Re: If Statement by fruiture in thread If Statement by Baz