in reply to Re: stuck at "Use of uninitialized value in length at ..."
in thread stuck at "Use of uninitialized value in length at ..."
You may want to use the foreach keyword:
In general, that's a good solution. In this case, you'd end up with
which is a needless waste of memory. The following is much more appropriate:my @all_words = <FH1> ; foreach (@all_words) {
which is short forwhile (<FH1>) {
while (defined($_ = <FH1>)) {
|
|---|