#!/usr/bin/perl # $Id: cmpentpm,v 1.1 2003/05/19 09:37:22 ehood Exp $ # Compare two char mapping tables. Comes in handy to see how different # similiar mappings are. my $map1 = require shift(@ARGV); my $map2 = require shift(@ARGV); my $h1 = $map1; my $h2 = $map2; my($char, $uni, $uni2); while (($char, $uni) = each %$h1) { $uni2 = $h2->{$char}; if (!defined($uni2)) { print "0:$char:$uni\n"; next; } delete($h2->{$char}); if ($uni ne $uni2) { print "!:$char:$uni:$uni2\n"; next; } } while (($char, $uni2) = each %$h2) { print "1:$char:$uni2\n"; }