in reply to If Statement
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]