summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Prymmer <PPrymmer@factset.com>2003-11-04 05:00:07 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-11-05 07:41:41 +0000
commitd7449b02c4549caa1b82f58e67506c6c718fc687 (patch)
tree61b3471bb031a7703253ad17a17618db0b373718
parenta411aea0a3f8c0416fcb2b5bf9b69fb9ae7ff965 (diff)
downloadperl-d7449b02c4549caa1b82f58e67506c6c718fc687.tar.gz
Re: [gherteg@csc.com: your CPAN page on EBCDIC]
Message-ID: <OF9A22A404.A32A5C26-ON85256DD4.00522E92-85256DD4.005268A4@factset.com> p4raw-id: //depot/perl@21656
-rw-r--r--pod/perlebcdic.pod4
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perlebcdic.pod b/pod/perlebcdic.pod
index 0305b6b323..942526b0e9 100644
--- a/pod/perlebcdic.pod
+++ b/pod/perlebcdic.pod
@@ -664,13 +664,13 @@ it in tr/// like so:
'\060\061\062\063\064\065\066\067\070\071\263\333\334\331\332\237' ;
my $ebcdic_string = $ascii_string;
- eval '$ebcdic_string =~ tr/\000-\377/' . $cp_037 . '/';
+ eval '$ebcdic_string =~ tr/' . $cp_037 . '/\000-\377/';
To convert from EBCDIC 037 to ASCII just reverse the order of the tr///
arguments like so:
my $ascii_string = $ebcdic_string;
- eval '$ascii_string = tr/' . $cp_037 . '/\000-\377/';
+ eval '$ascii_string =~ tr/\000-\377/' . $cp_037 . '/';
Similarly one could take the output of the third column from recipe 0 to
obtain a C<$cp_1047> table. The fourth column of the output from recipe