open (my $inwp , "<:encoding(utf8)" , "$pwt") or die "$pwt: $!" ; while (<$inw>) { my @pwords ; my @ptw ; my $elementp ; my $countp ; @pwords = split (/\n/ , $inwp) ;
The variable $inwp is a FILEHANDLE and does not contain any data from the file $pwt.
open (my $nwt , "<:encoding(utf8)" , "$ntw" ) or die "$ntw: $!" ; while (<$itw>) { $numlinenw++ ; my @nwords ; my @ntw ; my $elementn ; my $countn ; @nwords = split (/\n/ , $nwt) ;
The same thing with the variable $nwt.
In reply to Re: problem count the number of words
by jwkrahn
in thread problem count the number of words
by GHMON
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |