[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Some advice on perl: read byte to hex string



On 9/20/06, Welly Hartanto <ms.linuz@gmail.com> wrote:
I've managed to create an application for reading some bytes of data
from an id card reader connected into a serial port.
But it's under Win$ ...
So, now I've been trying for at least capturing the data then convert
it the way I want.
The convertion is called "byte to hex string" convertion.
Below is the perl script I have so far but the result is not what I
expect it.
The same algorithm works perfectly in java and vc++
[...]
    $str2 = hec($c2);                         #convert to hex
                     ^
Aside from this typo, what is this supposed to do?  That is, can you
provide an example or two of input strings ($gotit) and corresponding
output strings?

--
Michael A. Marsh
http://www.umiacs.umd.edu/~mmarsh
http://mamarsh.blogspot.com



Reply to: