my @lines; @ARGV = $file; while (<>) { my @fields = ...; push @lines, \@fields; }