in reply to Re^5: Use of uninitialized value in string eq
in thread Use of uninitialized value in string eq
No--it looks like I must have added the | immediately prior to the initial posting. I've taken out the $fh from the code, so it now reads:
my @files = <*.htm>; foreach $file (@files) { open($file or die "can not open .txt file: $!") ; while(<$file>) { my $dom = Mojo::DOM->new(<$file>); my $text = $dom->all_text(); for (split/\s+/, $text) { push @sequence, $_ ; if (@sequence >=10) { shift @sequence until @sequence ==10 ; ++$sequences{"@sequence"}; } } } } close($file) ;
This specification is what generates the "Can't use string..." error I cited.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Use of uninitialized value in string eq
by mr_mischief (Monsignor) on Sep 10, 2014 at 17:37 UTC | |
by Anonymous Monk on Sep 10, 2014 at 18:18 UTC | |
by SuicideJunkie (Vicar) on Sep 10, 2014 at 18:37 UTC |