Convert-EBCDIC

 view release on metacpan or  search on metacpan

tools/mkctbl.pl  view on Meta::CPAN

# in ascending order.
# 1) set tblpath to were the file transferred from your EBCDIC system
# 2) Run this on the ASCII based system
# You now have a file containing the translation table
#
use integer;

my $tblpath = 'tbl';

open(CTBL, "<$tblpath") || die "opening $tblpath\n";
$/ = '';
my @e2a_tbl = unpack("C256", <CTBL>);
my @a2e_tbl = ();
my $nul_str = "";
my $a2e_str = "";
my $e2a_str = "";
close(CTBL);
foreach $i ( 0 .. 255 ) {
    $nul_str .= sprintf("\\%03o", $i);
    $nul_str .= "\\\n" if ($i % 16) == 15;
    $e2a_str .= sprintf("\\%03o", $e2a_tbl[$i]);

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.311 second using v1.00-cache-2.02-grep-82fe00e-cpan-cec75d87357c )