Re: Reading binary files in Perl

2004-05-06 Thread John W. Krahn
Paul Harwood wrote: I am trying to read a binary file with the following code: $filename = binary_file.rpy; open(FILE, $filename) or die can't open $filename: $!; binmode(FILE); binmode(STDOUT); while (read(FILE, $buff, 8 * 2**10)) { print STDOUT $buff; } I get

Reading binary files

2001-07-26 Thread Sambamoorthy Jayaraman
Hi, How do I read a binary file?? From this file, I need to read 16 bit values. I have attached a sample binary file alongwith. When you are reading this file, enable `hex edit mode'. Any help will be deeply appreciated. Regards, Samba

Re: Reading binary files

2001-07-26 Thread Maxim Berlin
Hello Sambamoorthy, Thursday, July 26, 2001, Sambamoorthy Jayaraman [EMAIL PROTECTED] wrote: SJ How do I read a binary file?? From this file, I need to read 16 bit values. SJ I have attached a sample binary file alongwith. When you are reading this SJ file, enable `hex edit mode'. perldoc -f

RE: Reading binary files

2001-07-26 Thread Bob Showalter
-Original Message- From: Sambamoorthy Jayaraman [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 2:32 AM To: [EMAIL PROTECTED] Subject: Reading binary files Hi, How do I read a binary file?? From this file, I need to read 16 bit values. I have attached a sample