field1 field2 field3 field4 field5 field6 field7 field8
####
Aug 11 2010 1:40PM
####
local *IN;
open(IN, "/var/tmp/myfile.dat") or die "Can't read /var/tmp/myfile.dat: $! \n";
binmode(IN);
my $buf_e = '';
my $buf_d = '';
my $BLOCK_SIZE = 8192;
my @recs;
# Shove the contents of file into an array
while (sysread(IN, $buf_e, $BLOCK_SIZE, length($buf_e))) {
push(@recs, [ $1, $2, $3, $4, $5, $6, $7, $8 ])
while ($buf_d =~ s/^(\S+)\t+(\S+)\t+(\S+)\t+(\S+)\t+(\S+)\t+(\S+)\t+(\S+)\t+(\S+)\n//s);
}
close(IN);
print @recs;