my $file = "..."; unless( open( FILE, "<", $file ) ) { print STDERR "Error opening '$file': $!\n" print STDERR "Hit to exit\n"; scalar ; exit 1; } my @array = ; close( FILE ) or die "close '$file': $!\n";