Re: How to read binary file?

2003-03-02 Thread NGaneshBabuA
Hi, open(FILEHANDLE, filename); binmode(FILEHANDLE); above two statements will work if you want to read a binary file. There is not need of using read function here. Regards, Ganesh "John W. Krahn" <[EMAIL PROTECTED]> wrote: >Jonathan Lee wrote: >> >> Hi all, > >Hello, > >> Can someone ple

Re: How to read binary file?

2003-02-27 Thread John W. Krahn
Jonathan Lee wrote: > > Hi all, Hello, > Can someone please help... > > I am trying to write a script to do the following - > > 1/ Open up a binary file to read. > > 2/ Read the file byte by byte. Why do you think that you need to read the file a byte at a time? > 3/ Convert the bytes read

How to read binary file?

2003-02-27 Thread Jonathan Lee
Hi all, Can someone please help... I am trying to write a script to do the following - 1/ Open up a binary file to read. 2/ Read the file byte by byte. 3/ Convert the bytes read from binary to Hex. I think the "binmode" and "pack" function should be used but can't get it right... or maybe I'