in reply to Re^2: Looking for pointers or optimizations.
in thread Looking for pointers or optimizations.
open (my $fh, "<", $ARGV[0]) or die "Can't open input file!"; my @words; ### The above die function should also return OS_ERROR if open funct +ion failed ### ... die "can't open file: $!"; while (<>) { ### <> will read from the STDIN not the filehandler $fh ### so that should be while(<$fh>){...} push(@words, $_); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Looking for pointers or optimizations.
by thmsdrew (Scribe) on Aug 21, 2012 at 14:20 UTC | |
by 2teez (Vicar) on Aug 21, 2012 at 14:57 UTC | |
by SerZKO (Beadle) on Aug 21, 2012 at 19:12 UTC | |
by chromatic (Archbishop) on Aug 21, 2012 at 19:59 UTC | |
by SerZKO (Beadle) on Aug 22, 2012 at 06:16 UTC | |
by choroba (Cardinal) on Aug 21, 2012 at 19:58 UTC |