in reply to Reading Binary

I'd advice reading up on the duel binary ninja-like functions of pack() and unpack() for all your bit munging needs. Not being as familiar as I'd like with these ubiquitous bit twiddling functions I shall only give a small example of code
open(my $fh, "binary.file") or die("ack - $!"); my $chunk; while(read($fh, $chunk, 4)) { my $data = unpack("i", $chunk); print "data is $data\n"; }
This works fine on a file containing a bunch of integers on my linux system, so it may need tweaking from platform to platform (see. Abigail-II's note about using L pack format).
HTH

_________
broquaint