in reply to grep { $var } @arr

> Am I missing something simple or is this simply illegal?

Its code, so put it into a function. grep allows replacing the EXPR with a function call and $_ is global anyway. :)

Cheers Rolf

(addicted to the Perl Programming Language)