open(my $fh, '<', $filename) or die("Unable to open ...: $!\n"); chomp(my @myarray = <$fh>);