open(my $fh, "<", $ARGV[0]) or die "cannot open input file: $!"; my @words = <$fh>; close $fh or die "cannot close input file: $!"; ############## my $words = @words;