my $REC_SIZE = 16; # 16 byte records. my $buf; # location to store records my @records; # array of records. while (read FH, $buf, $REC_SIZE) { push @records, $buf; }