http://www.perlmonks.org?node_id=988742


in reply to Re: Looking for pointers or optimizations.
in thread Looking for pointers or optimizations.

It worked fine but yes there was an empty file named 1.

If I change it to the following it should work as I meant it to:

open (my $fh, "<", $ARGV[0]) or die "Can't open input file!"; my @words; while (<>) { push(@words, $_); }