my %old=(cc=>undef, x=>"fritz"); my %new=(cc=>"fritz", x=>undef); print @{[sort values %old]}~~@{[sort values %new]}