For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > August 2005 > Transliteration operator(tr//)on EBCDIC platform









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Transliteration operator(tr//)on EBCDIC platform
Sastry

2005-08-04, 4:02 am

Hi

I am trying to run this script on an EBCDIC platform using perl-5.8.6
=20
($a =3D "\x89\x8a\x8b\x8c\x8d\x8f\x90\x91") =3D~ tr/\x89-\x91/X/;
is($a, "XXXXXXXX");


The result I get is=20

'X=AB=BB=F0=FD=B1=B0X'

a) Is this happening since \x8a\x8b\x8c\x8d\x8f\x90 are the gapped
characters in EBCDIC ?
or=20
b) Should all the bytes in $a change to X?

Thanks in advance
Sastry
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com