>>753
grepについての疑問のとこは細かい話に見えるかもですが
スカラーコンテキストでは個数が返る、です。

perldoc -f grep
> In scalar context, returns the number of times the expression was true.