in reply to How to organize file records
You may also need to use binmode() depending on your operating system. And btw, you can use Perl's length() function to determine the size of scalars.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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
I know how to read files etc.
by Corion (Patriarch) on Mar 15, 2000 at 22:21 UTC |