open FH, 'foo.txt' or die "$!: can't open foo.txt\n"; my @file = ; close FH;