I think i have the idea to the pack and unpack functions i am using but it still is not working write. First here is the code i need to transfer to PERL.
- #define uchar unsigned char
-
#define ushort unsigned short int
-
#define ulong unsigned int
Im at the understanding that is saying i need to define the varible uchar and the others as an unsigned char. In PERL i think i do that by using pack with the C operator so the code i have looks like,
- $uchar = "2131Adam2113";
-
pack 'C', $uchar;
-
print $uchar;
But for some reason i get the output of 2131Adam2113 instead of just char like Adam???