Whoops sorry I just realised to said word count.
Try:
my $count = 0;
for (@_) {
my @words = split /\b/;
$count += scalar @words;
}
return $count;
}
Try:
Code:
sub { my $count = 0;
for (@_) {
my @words = split /\b/;
$count += scalar @words;
}
return $count;
}