$txt3->delete("1.0","end"); my $hexor = unpack('h*',pack('h*',$t1) ^ pack('h*',$t2)); $txt3->insert("1.0",$hexor);