The regex might need to be adjusted depending on the exact definition of what should be counted as a quoted string within the input data.use File::Slurp; my $text = read_file('input.txt'); while ($text =~ /" (.*?) "/sg) { print "Found quoted string with ".split(' ', $1)." words: $1\n"; }
In reply to Re: Count Quoted Words
by smls
in thread Count Quoted Words
by flash4syth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |