in reply to no grep match returns undefined?

In list context, grep will return an empty list if no matching elements were found. What you're doing is trying to access the 0th first element of an empty list, which results in undef.

-- Mike

--
just,my${.02}