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.