in reply to Count Quoted Words

Given an array @words like shown in the question, you could do:
my $count; foreach (@words) { my $quote = ($_ eq '"'); if ($quote ... $quote) { if (!$quote) { $count++ } elsif ($count) { print "$count quoted words\n"; $count = 0 } } }
Although I admit that the ... operator is slighty obscure... :)