in reply to reading binary files with Perl
Depending on your OS, another problem is the lack of binmode. Add binmode(FH) after the open so that Perl doesn't mess with the data. Not all OSes require binmode, but it's safe to use binmode on all OSes.
Oh and I'd use l instead of i. i is not guaranteed to be 4 bytes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: reading binary files with Perl
by jpk1292000 (Initiate) on Nov 16, 2006 at 19:09 UTC |