Convert::EBCDIC, ascii2ebcdic, ebcdic2ascii - Perl module for string conversion between EBCDIC and ASCII
use Convert::EBCDIC; $ascii_string = ebcdic2ascii($ebcdic_string); $ebcdic_string = ascci2ebcdic($ascii_string); $translator = new Convert::EBCDIC; $translator = new Convert::EBCDIC($table); $ascii_string = $translator->toascii($ebcdic_string); $ebcdic_string = $translator->toebcdic($ascii_string); $Convert::EBCDIC::ccsid819
This module can be used to import then functions ascii2ebcdic and/or ebcdic2ascii or in an Object mode.
Exported Functions:
takes as the first argument a EBCDIC string that is to be converted to ASCII using default converion table.
takes as the first argument a ASCII string that is to be converted to EBCDIC using default converion table.
Object methods:
creates a new translator object. Will take an optional argument being a 256 character conversion table.
takes and ASCII string and return and EBCDIC string.
takes and EBCDIC string and return and ASCII string.
Translation tables:
Character Code Set ID 00819. This is the default on most systems.
Character Code Set ID 01047. This is the default on OS390.
This module should work on any system with Perl 5. Tested under SPARC Solaris, OS390, HP-UX AS400/OS400 RISC.
Chris Leach <leachcj@bp.com>.
To install Convert::EBCDIC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Convert::EBCDIC
CPAN shell
perl -MCPAN -e shell install Convert::EBCDIC
For more information on module installation, please visit the detailed CPAN module installation guide.