sub make_grep { my $pat = shift; my $re = qr/$pat/; return sub { grep /$re/, @_ } }