perl -E "say grep {$ARGV[$_]=~/xxx/} 0..$#ARGV" aaa xxx bb cc xxx dd xxx eee 146