in reply to Re^2: grep trouble
in thread grep trouble

you also have to check for undef:

DB<120> print scalar grep {"a"=~/$_/} ("a","",undef) 3

Cheers Rolf