in reply to grep surprise

Because grep evaluated in scalar context (as you are doing) returns the number of elements of the input list that satisfy the condition.


Give a man a fish:  <%-{-{-{-<