if ( (not defined $new and not defined $old) or (defined $new and defined $old and $old eq $new) ) { ... }