use strict; use warnings; use Tie::File; my @records; tie @records, 'Tie::File', "pile_out.txt"; my $in_file = "fake_vals.fem"; my $outIndex = 10; open my $in, '<', "$in_file" or die "cannot open '$in_file' for reading: $!\n"; while (my $line = <$in>) { next if $line !~ /\bNODE\b/i; chomp $line; $records[$outIndex] = $line; ++$outIndex; } ####