in reply to Binary Data File

Why not take advantage of the $/ variable like so
open(my $fh, $data_file) or die("ack: $!"); binmode($fh); my @records; { # see. the man perlvar for more info on $/ local $/ = \4; push @records, [ $_, scalar <$fh> ] while <$fh>; }
Now you'll have an array of arrays, where each array contains a pair of 4 byte records.
HTH

_________
broquaint