my $x = "aabbcc"; my $y = "112233"; printf '%x', hex($x) ^ hex($y); #bb99ff