[EMAIL PROTECTED] wrote:
> Hi,
> Among other data, a binary file contains the bytes "00A5".
> I am trying to read these four bytes and get the decimal equivalent as
> follows:

[snip]

> read(FD, $buf, 4);      #### $buf -> "00A5"

I'm not sure I follow. Are you saying the characters in buf are

   0x30 (an ASCII "0") char
   0x30 (an ASCII "0") char
   0x41 (an ASCII "A") char
   0x35 (an ASCII "5") char

Or are they:

   0x00
   0x00
   0x0A
   0x05

Or is it:

   0x00
   0xA5

(but that's only 2 bytes)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to