Re: hex to ebcdic
- From: roch77@xxxxxxxxx
- Date: Fri, 29 Jun 2007 17:05:50 -0700
Thanks a lot.
I have Convert::EBCDIC, but didn't quite figure out how to do it.
Actually the file that I am ftping from the mainframe has packed
numeric (comp.) as well as these display fields. So thats why I do a
binary mode ftp.
Then I use "unpack "H*", $buf" and all the display fields show up as
hex representation of EBCDIC.
So I will use Gunner's suggestion to convert them.. There maybe other
ways like the convertibm390 module as well I guess..
Thanks very much once again..
use Convert::EBCDIC 'ebcdic2ascii';
$hex = 'f1f2d7d9f0';
( $ebcdic = $hex ) =~ s/(..)/chr(hex $1)/eg;
$ascii = ebcdic2ascii( $ebcdic );
--
Gunnar Hjalmarsson
Email:http://www.gunnar.cc/cgi-bin/contact.pl
.
- References:
- hex to ebcdic
- From: roch77
- Re: hex to ebcdic
- From: Gunnar Hjalmarsson
- hex to ebcdic
- Prev by Date: Re: Problem with PERL function
- Next by Date: Re: Assigning another filehandle to STDOUT, using binmode.
- Previous by thread: Re: hex to ebcdic
- Next by thread: Re: hex to ebcdic
- Index(es):
Relevant Pages
|
|