#!/usr/bin/perl -w use strict; my $c = sub {substr shift(), 0, 2 }; my $d = sub {substr shift(), 0, 1 }; my $f = sub { $_[1] ->( $_[0] ) }; my $data = join '', map sprintf( '%02x', $_ & 1 ? $_ : 255 - $_ ), 0 .. 255; my @japh = ( [qw[082 15E]], [qw[258 0B1]], [qw[258 071]], [qw[258 091]], [qw[042 002]], [qw[258 0C2]], [qw[124 028]], [qw[258 0DE]], [qw[258 16F]], [qw[0C2 0F0]], [qw[258 0CA]], [qw[258 051]], [qw[1A0 00A]], [qw[258 015]], [qw[258 134]], [qw[258 1AF]], [qw[0C2 064]], [qw[1A4 1F4]], [qw[0D6 116]], [qw[258 13C]], [qw[258 0C6]], [qw[258 0D6]], [qw[0C2 1EB]], [qw[1F1 1A0]], [qw[258 042]], [qw[1F4 0A0]]); while (my $chr = shift @japh) { my ($l, $r) = map hex(), @$chr; print chr hex ($l >= 501 ? substr($data, $r, 2) : substr($data, $l, 1) . substr($data, $r, 1) ); }